Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet_change
Hi How do i use the worksheet change sub but not have it
fire until after the report is created. as at the moment each time a cell is written to when report is being created it just messes up |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet_change
If you're creating the report in code, wrap your report generation
code with Application.EnableEvents = False 'Do report stuff here Application.EnableEvents = True You'll then need to have one last change to fire the Worksheet_Change() macro. In article , "Andrew haycock" wrote: Hi How do i use the worksheet change sub but not have it fire until after the report is created. as at the moment each time a cell is written to when report is being created it just messes up |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet_change
"Andrew haycock" wrote in message
... Hi How do i use the worksheet change sub but not have it fire until after the report is created. as at the moment each time a cell is written to when report is being created it just messes up Hi Andrew, That depends on what's writing to your cells. If you are running a VBA program that's doing the writing and causing this event to fire, then add the following line at the beginning of the code: Application.EnableEvents = False and when you are ready for the Worksheet_Change event to fire again add the line: Application.EnableEvents = True If the user is entering data on the worksheet and causing the Worksheet_Change event to fire then there isn't much you can do. This is what the event was designed for. -- Rob Bovey, MCSE, MCSD, Excel MVP Application Professionals http://www.appspro.com/ * Please post all replies to this newsgroup * * I delete all unsolicited e-mail responses * |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sub Worksheet_Change | Excel Discussion (Misc queries) | |||
Worksheet_change won't run | Excel Discussion (Misc queries) | |||
Worksheet_Change | Excel Programming | |||
worksheet_change vs. calculate, and worksheet_change not running | Excel Programming | |||
worksheet_change vs. calculate, and worksheet_change not running | Excel Programming |