Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to prevent vba code from running?
I used some very simple vba codes to automatically save a file to several new
locations on a server after editing as a private sub in WorkBook_BeforeClose event. It works ok but the vba codes were also saved in the final output workbooks. Is there anyway I can disable the codes from running in the output files? Basically, I want the codes to stop running in the output file without "disabling macro" when Excel is launched. The users are not that computer savy and got scared when they see the disable/enable macro box popping up. Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to prevent vba code from running?
Can you locate the workbooks and just delete the code?
HTH, JP On Nov 16, 4:57 pm, kfng wrote: I used some very simple vba codes to automatically save a file to several new locations on a server after editing as a private sub in WorkBook_BeforeClose event. It works ok but the vba codes were also saved in the final output workbooks. Is there anyway I can disable the codes from running in the output files? Basically, I want the codes to stop running in the output file without "disabling macro" when Excel is launched. The users are not that computer savy and got scared when they see the disable/enable macro box popping up. Thanks! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to prevent vba code from running?
If the distribution copies of the workbook will never use the macros,
keep the macros in your PERSONAL.XLS or in another separate workbook that you load when you personally are working with the distribution workbook???? Or just delete the macro module in the distribution version of the workbook??? On Fri, 16 Nov 2007 13:57:01 -0800, kfng wrote: I used some very simple vba codes to automatically save a file to several new locations on a server after editing as a private sub in WorkBook_BeforeClose event. It works ok but the vba codes were also saved in the final output workbooks. Is there anyway I can disable the codes from running in the output files? Basically, I want the codes to stop running in the output file without "disabling macro" when Excel is launched. The users are not that computer savy and got scared when they see the disable/enable macro box popping up. Thanks! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to prevent vba code from running?
Or in the workbook open section add a piece of code to check for the name of
the workbook if activeworkbookname = "Master" then call <your procedure endif "kfng" wrote: I used some very simple vba codes to automatically save a file to several new locations on a server after editing as a private sub in WorkBook_BeforeClose event. It works ok but the vba codes were also saved in the final output workbooks. Is there anyway I can disable the codes from running in the output files? Basically, I want the codes to stop running in the output file without "disabling macro" when Excel is launched. The users are not that computer savy and got scared when they see the disable/enable macro box popping up. Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
hide/protext auto_open code so user can't prevent it from running | Excel Programming | |||
how to prevent code running when in a worksheet code | Excel Programming | |||
Prevent code in "Sheet Activate" from running when sheet made visible from other macr | Excel Programming | |||
Prevent others from running my macros | Excel Programming | |||
Prevent Excel crash when running | Excel Programming |