Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Please forgive me, because I really don't know what I'm doing
yet much with VBA, but . . . I'm already tired of typing at the top of each VBA module With Application .ScreenUpdating = False .EnableEvents = False End With and then turning it back on at the bottom. So I thought of something like this: ========================================= Public Sub toggleEvents(evTog As Boolean) On Error Resume Next evTog = Abs(evTog - 1) With Application .ScreenUpdating = evTog .EnableEvents = evTog End With Debug.Print evTog & " Kilroy was here" 'On Error GoTo 0 End Sub ========================================= Well, gee, but it says True all the time. What am I doing wrong? Also, I tried Googling for similar things but so far have come up empty. Does everybody really just turn that stuff off and back on with lines of code in every module? =dman= |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Combining two ranges based on common a common value | Excel Discussion (Misc queries) | |||
Exporting tasks | Excel Worksheet Functions | |||
Common footer but not common margins please -(Page 1 of 2) etc | Excel Discussion (Misc queries) | |||
combining tasks | Excel Programming | |||
Automating some tasks | Excel Discussion (Misc queries) |