Worksheet Events are amazing tools that can bring life and automation into your Excel Programs, such as triggering a macro when you click to a specific sheet, select a certain cell or even make changes to specific areas of a worksheet.
Sometimes, you'll find that your worksheet event isn't firing and if you're like me, you'll be scratching your head trying to uncover this strange occurrence. What do you do?
First, let's look at some of the reasons your worksheet event isn't firing and then we'll look at how to fix it.
- Make sure your security settings allow macros and events to fire
- Make sure your workbook isn't inside a zipped/archived folder (.zip, .7z, .rar, etc), because that will cause your workbook to be Read-Only and will disallow macros
- Don't try initiating it with F5 or F8 (Step Through). Some events can only be triggered by the actual event itself, such as a Worksheet_Change() event needing to be triggered by an actual cell being changed. You can't step into the code with F8 or F5, however you can put a breakpoint.
- Try using a breakpoint to test whether the Event is firing (using the thin grey line to the left of your code or with F9 key or using the word STOP on it's own line of code). Then you can step through or finish the code with F5 once it's working.
- Make sure events are enabled. Hint: you can enable this anytime in the immediate window (Ctrl + G) by using Application.EnableEvents = True (then hit Enter)
- Try enabling Screenupdating in the Immediate Window as well using Application.ScreenUpdating = True (then hit Enter)
- Try enabling worksheet Calculations as automatic instead of manual in the Immediate Window as well using Application.Calculation = xlCalculationAutomatic (then hit Enter)
- Try re-starting your workbook and see if the events will fire now
- Are there any errors that are firing that are preventing the macro from starting? Fix those errors and see if it will finish firing now.
- Try using the free VBA Code Cleaner to clean up hidden issues/errors that may be lurking in your VBE.
If your Worksheet Events aren't firing now, please put a comment below or contact us and we'll try to help you figure out what's going on.
Join our Excel Automation Course to learn more about how you can Automate your workflow and make Excel Do Your Work For You!