G
Greg Maxey
I have read here and in the VBA Help File that GoTo statements shoud be
avoided.
I am playing with a macro that is represented by the following example:
Sub Test()
Dim A
Dim uDecide As VbMsgBoxResult
A = True 'Resprents something alreay done
If A = True Then
uDecide = MsgBox("Do you want to undo the something alredy done?",
vbYesNo)
If uDecide = 6 Then
MsgBox "Undo something action in progress"
Else: GoTo DSE
End If
ElseIf A = False Then
DSE:
MsgBox "Do something else in progress"
End If
End Sub
Question - Is there a better construction that avoids the GoTo statement?
avoided.
I am playing with a macro that is represented by the following example:
Sub Test()
Dim A
Dim uDecide As VbMsgBoxResult
A = True 'Resprents something alreay done
If A = True Then
uDecide = MsgBox("Do you want to undo the something alredy done?",
vbYesNo)
If uDecide = 6 Then
MsgBox "Undo something action in progress"
Else: GoTo DSE
End If
ElseIf A = False Then
DSE:
MsgBox "Do something else in progress"
End If
End Sub
Question - Is there a better construction that avoids the GoTo statement?