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
 
Back
Top