G
Guest
I have a master Sub which calls in Sub routines in its body.
I want to be able to switch Screen.Updating on or off for ALL the main sub
and those subs referred to in it, but only answer the MsgBox once at the
beginning of the Sub.
How can I get the Answer to apply to all Subs?
Thanks in advance for your help.
Here is my code:
Sub Optimise()
Ans = MsgBox("ScreenUpdating?", vbYesNo)
Select Case Ans
Case vbYes
Application.ScreenUpdating = True
Case vbNo = False
Application.ScreenUpdating = False
End Select
If (condition) Then
MySub1
ElseIf (condition) Then
MySub2
End If
End Sub
I want to be able to switch Screen.Updating on or off for ALL the main sub
and those subs referred to in it, but only answer the MsgBox once at the
beginning of the Sub.
How can I get the Answer to apply to all Subs?
Thanks in advance for your help.
Here is my code:
Sub Optimise()
Ans = MsgBox("ScreenUpdating?", vbYesNo)
Select Case Ans
Case vbYes
Application.ScreenUpdating = True
Case vbNo = False
Application.ScreenUpdating = False
End Select
If (condition) Then
MySub1
ElseIf (condition) Then
MySub2
End If
End Sub