This is happening to users with Excel 2007/2010 who are using Worksheet_Change and Worksheet_SelectionChange events that I've designed in 2013.
What seems to be happening is that when they first open the workbook, their worksheet events do not fire. I've made sure they have their options defaulted to enable macros. If I open the immediate window and run Application.EnableEvents = True
then their events start firing just fine. Users with Excel 2013 don't seem to have this issue, even when opening the exact same copy of the workbook from a shared network drive.
I seem to have been able to fix this by putting Application.EnableEvents = True
under the Workbook_Open event, but I wonder about this as a viable long-term solution. I'd would really rather figure out why this be happening in the first place to address it directly.
EnableEvents. This property can be set to False to prevent the application from raising any of its events. Do not even be tempted to use this as your code will never be the only code running and other developers will have created add-ins or code behind solutions that will rely on events being fired.
EnableEvents is a property in Excel VBA where you can specify whether you want events to take place when the VBA code is running or not. An event is usually attached to an object. VBA Events could include things such as activating a worksheet or saving a workbook or double-clicking on a cell.
I had a similar issue today on some Word VBA. And it was located in a hidden project. It turned out that the On Error event handlers we incorrectly coded by someone else. I used the AutoExec and AutoOpen macros and inserted a Stop to go into debugging mode and see what happens.
These events should fire unless you had set the EnableEvents to False in your code to begin with.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With