Results 1 to 4 of 4

Application.EnableEvents = FALSE not working

Threaded View

  1. #1
    Registered User
    Join Date
    05-31-2013
    Location
    Maryland, United Stated
    MS-Off Ver
    Excel 2007
    Posts
    1

    Application.EnableEvents = FALSE not working

    Hi all,

    I have the following code in my workbook:

    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
    Application.EnableEvents = False
    With Worksheets("Forecast Files")
    .Activate
    .FcstSchool.Value = "School"
    .Range("C3").Select
    ActiveWindow.ScrollColumn = ActiveCell.Column
    ActiveWindow.ScrollRow = ActiveCell.row
    End With
    With Worksheets("Revenue Forecasts")
    .Activate
    .Forecast.Value = "Forecast"
    .School.Value = "School"
    .Range("D3").Select
    ActiveWindow.ScrollColumn = ActiveCell.Column
    ActiveWindow.ScrollRow = ActiveCell.row
    End With
    Application.EnableEvents = True
    End Sub

    During normal use of the workbook, there is a Change event that triggers when FcstSchool is changed, but I do NOT want that to trigger during this save event. I've been using this workbook/code for a couple of years and it's never been an issue, now all of the sudden the Change event is triggering after the highlighted line despite the EnableEvents = False line. Any ideas why this would have changed all of a sudden and how I can get it to work properly again? Thanks!
    Last edited by slane52209; 10-14-2017 at 12:38 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. HELP: VBA not working becaluse of Application.EnableEvents = False
    By oct2mine in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-01-2015, 10:27 PM
  2. application.EnableEvents value changing to false
    By oosterhg in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-18-2012, 12:21 PM
  3. When will macro in module run when Application.EnableEvents is set to False?
    By twills in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-20-2010, 06:14 AM
  4. Application.EnableEvents Changes to False
    By Rushti in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-30-2009, 10:53 AM
  5. preventing Application.EnableEvents = False
    By x taol in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-29-2006, 06:20 AM
  6. Application.EnableEvents = False not working
    By Paul Martin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-10-2005, 12:06 AM
  7. [SOLVED] Problems with BeforeSave and Application.EnableEvents = False
    By Sanne in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-11-2005, 09:06 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1