[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Trouble getting any event to fire in Exccel 2007

Posted on 2011-09-08
11
Medium Priority
?
219 Views
Last Modified: 2012-05-12
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.
0
Comment
Question by:newbieweb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 4
11 Comments
 
LVL 81

Accepted Solution

by:
zorvek (Kevin Jones) earned 2000 total points
ID: 36504554
In the Immediate window type:

    Application.EnableEvents = True

and press ENTER.

Kevin
0
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 36504571
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
 

Author Comment

by:newbieweb
ID: 36504794
Where is the  Immediate window in 2007?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 81

Expert Comment

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

Kevin
0
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 36504915
Also, make sure macros are enabled when the workbook is opened.

Kevin
0
 

Author Comment

by:newbieweb
ID: 36505091
Do I simply need to paste in "Application.EnableEvents = True"?

Do I need to execute it?

0
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 36505097
Yes.

And make sure macros are enabled.

Kevin
0
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 36505098
Or you can just quit and restart Excel.

Kevin
0
 

Author Comment

by:newbieweb
ID: 36505131
>   Yes.

Yes, what?

Do I need to execute it and how do I do so? Or is pasting it sufficient?
0
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 36505479
In the Immediate window type:

    Application.EnableEvents = True

and press ENTER.

Kevin
0
 

Author Closing Comment

by:newbieweb
ID: 36505623
Thanks!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Cancel future meetings from user mailboxes in Office 365 using Remove-CalendarEvents
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question