Macro run order

  • Thread starter Thread starter Rui
  • Start date Start date
R

Rui

hi,

is there a way of setting some order in macros?

for instance, i don't want macro2 and 3 to run if
macro1 hasn't.

thank's.
 
Rui,

One way....
Set a Public variable within Macro1.

Public ItRan as Boolean
Sub Macro1()
ItRan = True
' your code
End Sub

Sub Macro2()
If ItRan = False Then Exit Sub
' your code
End Sub

John
 

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

Similar Threads


Back
Top