Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Moving Code
I have a series of workbooks that are being created through a VBA tool.
In each of these workbooks, I need to place code that will execute upon their opening and thus I need code in the This Workbook. I've tried to think of a way to do this by moving a worksheet from my tool into the new workbooks, but I can't seem to find a way. Am I better off having the code in another file that my tool opens, customizes the data in, and then closes? If so, how do I can I temporarily turn off the code in that file while my tool dumps data and formats in then turn it back on so that when a user opens that file, the code executes as it should. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Moving Code
application.EnableEvents = False
' open the workbook ' process the workbook ' close the workbook Application.EnableEvents = True -- Regards, Tom Ogilvy " wrote in message oups.com... I have a series of workbooks that are being created through a VBA tool. In each of these workbooks, I need to place code that will execute upon their opening and thus I need code in the This Workbook. I've tried to think of a way to do this by moving a worksheet from my tool into the new workbooks, but I can't seem to find a way. Am I better off having the code in another file that my tool opens, customizes the data in, and then closes? If so, how do I can I temporarily turn off the code in that file while my tool dumps data and formats in then turn it back on so that when a user opens that file, the code executes as it should. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
CODE 4 MOVING WITHIN A RANGE-TAB | Excel Discussion (Misc queries) | |||
Arrow Keys Moving Window Frame instead of Moving Between Cells | Excel Discussion (Misc queries) | |||
Code for moving cursor one cell to the right | Excel Programming | |||
Copying/moving code in a macro | Excel Programming | |||
Code for moving textbox | Excel Programming |