Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I stop a macro from running within a macro?
Hi, I have got everything set up so that when a cell is selected, it would
bring up the date calendar in order to insert the date. The problem I have is when I want to clear down all the data that has been entered onto the worksheet including the cells that contain the dates (using another macro) it stops on the cells and brings up the calendars, whereas this time I dont want them to. Is there someway I can enter something into my clear down code that would temporarily stop the calendars from popping up? Many thanks in advance John |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I stop a macro from running within a macro?
Hi JohnUK,
Try rewritng your code to avoid selectiions. It is rarely necessary to make selections. If, however, selection *is* necessary, then you could temporarily disable the event code that displays the calendar control by using using the EnableEvents property in the data clearing sub: Sub ClearData On Error GoTo CleanUp 'To reset Events in case of error! Application.EnableEvents = False 'Your clearing code CleanUp: Application.EnableEvents = True End sub --- Regards, Norman "JohnUK" wrote in message ... Hi, I have got everything set up so that when a cell is selected, it would bring up the date calendar in order to insert the date. The problem I have is when I want to clear down all the data that has been entered onto the worksheet including the cells that contain the dates (using another macro) it stops on the cells and brings up the calendars, whereas this time I don't want them to. Is there someway I can enter something into my clear down code that would temporarily stop the calendars from popping up? Many thanks in advance John |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I stop a Macro from running? | Excel Worksheet Functions | |||
Stop running a macro in the middle of a macro | Excel Programming | |||
How to stop a macro while it is running ? | Excel Programming | |||
When Save As stop running macro | Excel Programming | |||
How to Pause or Stop a running Macro | Excel Programming |