Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Temporarily Disabling an Event Macro

I have an event macro on a worksheet. Sometimes, I want
to disable the event macro while I do some monthly
maintenance work on the data on the worksheet. I am
looking for ways to do this that don't require the user to
go into the VBA module (i.e., I don't want him to have to
comment out the VBA code). Any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default Temporarily Disabling an Event Macro

You could attach this to a button or keyboard shortcut:


Public Sub EventsToggle()
With Application
.EnableEvents = Not .EnableEvents
MsgBox "Event macros are " & _
IIf(.EnableEvents, "dis", "en") & "abled."
End With
End Sub

In article ,
"stratuser" wrote:

I have an event macro on a worksheet. Sometimes, I want
to disable the event macro while I do some monthly
maintenance work on the data on the worksheet. I am
looking for ways to do this that don't require the user to
go into the VBA module (i.e., I don't want him to have to
comment out the VBA code). Any ideas?

  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Temporarily Disabling an Event Macro

Excellent! Thank you very much.


-----Original Message-----
You could attach this to a button or keyboard shortcut:


Public Sub EventsToggle()
With Application
.EnableEvents = Not .EnableEvents
MsgBox "Event macros are " & _
IIf(.EnableEvents, "dis", "en") & "abled."
End With
End Sub

In article ,
"stratuser" wrote:

I have an event macro on a worksheet. Sometimes, I

want
to disable the event macro while I do some monthly
maintenance work on the data on the worksheet. I am
looking for ways to do this that don't require the user

to
go into the VBA module (i.e., I don't want him to have

to
comment out the VBA code). Any ideas?

.

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
Disabling WORKSHEET_CHANGE event Jase Excel Discussion (Misc queries) 1 April 25th 08 04:32 PM
Disabling Macro Warning scojerroc Excel Discussion (Misc queries) 9 December 19th 07 07:08 PM
Help with Macro - Make Dropdown List Temporarily Wider AK9955 Excel Discussion (Misc queries) 2 April 27th 07 03:16 PM
Event Macro running another macro inside K1KKKA Excel Discussion (Misc queries) 1 December 20th 06 08:21 PM
Disabling an 'on load' macro Gizmo63 Excel Worksheet Functions 2 April 20th 06 12:51 PM


All times are GMT +1. The time now is 07:30 AM.

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"