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.
newbiewebSr. Software EngineerAsked:
Who is Participating?
 
zorvek (Kevin Jones)Connect With a Mentor ConsultantCommented:
In the Immediate window type:

    Application.EnableEvents = True

and press ENTER.

Kevin
0
 
zorvek (Kevin Jones)ConsultantCommented:
Sometimes, while debugging, we stop code execution when the code as executed:

    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
0
 
newbiewebSr. Software EngineerAuthor Commented:
Where is the  Immediate window in 2007?
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

 
zorvek (Kevin Jones)ConsultantCommented:
Press ALT+F11 to switch to the VBE. Press CTRL+G to open the Immediate window.

Kevin
0
 
zorvek (Kevin Jones)ConsultantCommented:
Also, make sure macros are enabled when the workbook is opened.

Kevin
0
 
newbiewebSr. Software EngineerAuthor Commented:
Do I simply need to paste in "Application.EnableEvents = True"?

Do I need to execute it?

0
 
zorvek (Kevin Jones)ConsultantCommented:
Yes.

And make sure macros are enabled.

Kevin
0
 
zorvek (Kevin Jones)ConsultantCommented:
Or you can just quit and restart Excel.

Kevin
0
 
newbiewebSr. Software EngineerAuthor Commented:
>   Yes.

Yes, what?

Do I need to execute it and how do I do so? Or is pasting it sufficient?
0
 
zorvek (Kevin Jones)ConsultantCommented:
In the Immediate window type:

    Application.EnableEvents = True

and press ENTER.

Kevin
0
 
newbiewebSr. Software EngineerAuthor Commented:
Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.