Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Do not save macro with workbook
I have a template with a startup macro in it and I would like to not save the
macro when they save the workbook. There are other macros in there that I would like to save with the file. Any good ideas? Thanks! Jeff |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Do not save macro with workbook
You could remove the macro, but that would depend on what the user's security
settings are. Since you're keeping other macros, why not just make it so that it doesn't run? Sub Workbook_Open() if me.path < "" then exit sub end if 'real code here End sub Or Sub Auto_Open() if thisworkbook.path < "" then exit sub end if 'real code here End sub Jeff wrote: I have a template with a startup macro in it and I would like to not save the macro when they save the workbook. There are other macros in there that I would like to save with the file. Any good ideas? Thanks! Jeff -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Do not save macro with workbook
That will work. Thanks you Dave!
"Dave Peterson" wrote: You could remove the macro, but that would depend on what the user's security settings are. Since you're keeping other macros, why not just make it so that it doesn't run? Sub Workbook_Open() if me.path < "" then exit sub end if 'real code here End sub Or Sub Auto_Open() if thisworkbook.path < "" then exit sub end if 'real code here End sub Jeff wrote: I have a template with a startup macro in it and I would like to not save the macro when they save the workbook. There are other macros in there that I would like to save with the file. Any good ideas? Thanks! Jeff -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro save workbook | Excel Discussion (Misc queries) | |||
Macro to save workbook | Excel Discussion (Misc queries) | |||
Save workbook not macro | Excel Programming | |||
possible to save macro with workbook as add-in? | Excel Programming | |||
"Save" macro problem, still prompted to save when closing workbook (?) | Excel Programming |