View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jeff Jeff is offline
external usenet poster
 
Posts: 921
Default 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