Re: Disable the macro by JGM
JGM
Wed Dec 10 23:05:13 CST 2003
Hi Ken,
Put your code in the ThisDocument.Document_New event.
Otherwise, if the macro is executed after some user prompt, then, for
example, you can:
Create a DocumentVariable (See the VBA help., it is full of examples)
Let's call it "RunOnceOnly"
When you create it, give it a value of 0.
At the end of your code, change th value to 1.
At the beginning of the code, check for the value of
RunOnceOnly. If it it is greater than 0 (or equal to 1), then the code has
been run at least once, so Exit Sub...
HTH
Cheers!
--
_______________________________________
Jean-Guy Marcil
jmarcil@sympatico.ca
"Ken" <skyoceanwalker@aol.com> a écrit dans le message de news:
066a01c3bfa0$602b0310$a401280a@phx.gbl...
> Hi,
>
> Is there any way to tell the macro to only run once, or
> disable it in some way after the auto-save, then maybe
> pop-up windows only be seen once? Thanks!
>
> Ken