Need to disable my vba macro once I email out the file.

C

Chris

I have a macro that opens automatically, runs a couple of calculations and is
programmed to email the completed workbook at the end. I want a way to
disable the macro when i send it so when it is opened by the recipients, the
macro does not automatically start again.

Thanks,

Chris
 
C

cht13er

I have a macro that opens automatically, runs a couple of calculations andis
programmed to email the completed workbook at the end.  I want a way to
disable the macro when i send it so when it is opened by the recipients, the
macro does not automatically start again.

Thanks,

Chris

You can save a copy of the file you produce and delete the code inside
it ... or else modify the code so that it's in a workbook all by
itself and it works on a different file ...

As for disabling the macro ... you could check for the username
(something like this
http://groups.google.com/group/micr...en&lnk=gst&q=domain+username#95c180f20f310923
) and only run the code if you're the logged-in user ... or you could
require a password to start the code ... etc

HTH

Chris
 
C

Chris

Do you know any code off hand that would allow me to save the file and delete
out the vba like you stated at the beginning of the reply?

Thanks...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top