Thread: Macro run order
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
John Wilson John Wilson is offline
external usenet poster
 
Posts: 550
Default Macro run order

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

Rui wrote:

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.