Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Application.EnableEvents

If you accidentally disabled events due to an error in logic, how do you turn
it back on?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Application.EnableEvents

Go into the VBE
Hit ctrl-g (to see the immediate window)
type:
application.enableevents = true
and hit enter.



DCPan wrote:

If you accidentally disabled events due to an error in logic, how do you turn
it back on?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Application.EnableEvents

I keep these two handy on a Toolbar for when I'm working on event code and
screwing it up.

Sub enable_events()
Application.EnableEvents = True
End Sub

Sub disable_events()
Application.EnableEvents = False
End Sub


Gord Dibben MS Excel MVP

On Fri, 17 Oct 2008 14:18:01 -0700, DCPan
wrote:

If you accidentally disabled events due to an error in logic, how do you turn
it back on?


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,344
Default Application.EnableEvents

Hi,

In your finished code you should consider something like this

Sub myProcedure()
On Error GoTo ErrorHandler

'your code here

ErrorHandler:
Application.EnableEvents = True
End Sub


--
Thanks,
Shane Devenshire


"DCPan" wrote:

If you accidentally disabled events due to an error in logic, how do you turn
it back on?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA-Application Gaurav Jindal Excel Discussion (Misc queries) 2 November 20th 06 09:50 AM
Application TullaOlsen Excel Discussion (Misc queries) 0 March 16th 06 07:57 PM
application.EnableEvents nc Excel Discussion (Misc queries) 1 September 28th 05 04:00 PM
Application Look Daniell Excel Discussion (Misc queries) 0 September 26th 05 10:48 PM
Application.run J cs via OfficeKB.com New Users to Excel 3 December 30th 04 04:46 PM


All times are GMT +1. The time now is 07:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"