Swithces in Macro
Write them as functions and return the result. As an example
Sub Macro1()
Dim ans
ans = MsgBox("Macro1", vbYesNo)
If ans = vbYes Then
If Func2 = vbYes Then
Func3
End If
End If
End Sub
Function Func2()
Dim ans
ans = MsgBox("Func2", vbYesNo)
Func2 = ans
End Function
Function Func3()
Dim ans
ans = MsgBox("Func3", vbYesNo)
Func3 = ans
End Function
--
HTH
RP
(remove nothere from the email address if mailing direct)
"vishu" wrote in message
...
Hi,
I have 3 macros to run.
When user run first macro, it will ask for Yes or No option.
If user select "yes" automatically 2 macro should run, If user selects
"No"
3 macro should run.
Can you please tell me how to write switches between these three macro?
Regards,
Vishu
|