Deactivation of autorun macros

R

Robert X

Hello,
I have a ProjectBeforeTaskChange macro in a module. Is it possible to run
another macro which will deactivate temporarily this autorun macro, during
its own process ?
Thanks for your help.

Robert
 
R

Rod Gill

Hi,

No, but there is another way around this. Create a Global variable called
NoInterrupts as a Boolean variable. At the beginning of each interrupt
code:
If NoInterrupts then
exit Sub
End If
NoInterrupts=True

'Interrupt code

NoInterrupts=False
End Sub

This way the interrupt only runs once and no other interrupt is triggered
until the NoInterrupts flag is set to False.
--

Rod Gill
Project MVP

NEW!! Project VBA Book, for details visit: http://www.projectvbabook.com
 
R

Robert X

Thanks Rod : that worked !

Another similar problem:
The ProjectBeforeTaskChange macro is fired each time the user clicks on the
Save button. Is it possible to lock this strange trigger?
Thanks again

Robert
 

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