curiouswebster
asked on
Trouble getting any event to fire in Exccel 2007
I debugged my database code inside an event that starts with:
Private Sub Worksheet_SelectionChange( ByVal Target As Range)
and all was fine. I was getting ready for my first source code check-in and must have deleted something on the Excel document because that event is not longer firing.
It was working anytime I moved the mouse on Sheet2.
Any idea how to get it wokring again??
Thanks.
Private Sub Worksheet_SelectionChange(
and all was fine. I was getting ready for my first source code check-in and must have deleted something on the Excel document because that event is not longer firing.
It was working anytime I moved the mouse on Sheet2.
Any idea how to get it wokring again??
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Where is the Immediate window in 2007?
Press ALT+F11 to switch to the VBE. Press CTRL+G to open the Immediate window.
Kevin
Kevin
Also, make sure macros are enabled when the workbook is opened.
Kevin
Kevin
ASKER
Do I simply need to paste in "Application.EnableEvents = True"?
Do I need to execute it?
Do I need to execute it?
Yes.
And make sure macros are enabled.
Kevin
And make sure macros are enabled.
Kevin
Or you can just quit and restart Excel.
Kevin
Kevin
ASKER
> Yes.
Yes, what?
Do I need to execute it and how do I do so? Or is pasting it sufficient?
Yes, what?
Do I need to execute it and how do I do so? Or is pasting it sufficient?
In the Immediate window type:
Application.EnableEvents = True
and press ENTER.
Kevin
Application.EnableEvents = True
and press ENTER.
Kevin
ASKER
Thanks!
Application.EnableEvents = False
but has not yet executed:
Application.EnableEvents = True
This leaves the application environment in a state we do not normally want.
Kevin