Skip a Macro

V

Vick

I have a worksheet_selection change macro, that I would like to skip if
another Macro is running, is that possible? Is it possible to tell if a macro
is commanding the change or the user?

Thanks
 
M

Mike H

Vick,

Try this

Application.EnableEvents = False
'Your code
Application.EnableEvents = True

Mike
 
D

Dave Peterson

If you have a macro that causes the worksheet_selection change event to fire,
you can tell excel to stop monitoring these changes.

In your macro

application.enableevents = false
selection.offset(1,0).select 'or whatever your code does
application.enableevents = true

But even better would be to change your macro so that it's not selecting
anything when it runs. There aren't many things that have to be selected to
work on them.
 

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