D
Dennis
I must be looking up answers the wrong way.
Sub ..........
Do Until UCase(MyView) = "ALL" Or UCase(MyView) = "CMI" Or UCase(MyView) = "XL"
MyView = InputBox("Enter CMI or XL or ALL", "Enter Desired View")
If vbCancel Then Exit Sub
Loop
..............
.............
End Sub
I want to Exit the Sub if the Cancel Button is pressed.
vbCancel has a value of 2 as soon as I step into the first Sub GetMyView()
How do I reset vbCancel to 0 just before the message box?
Or, how do I exit the Sub (out of the loop) only when the Cancel Button is pressed
but continue the Sub when CMI or XL or ALL is entered?
I know this is basic.
Sub ..........
Do Until UCase(MyView) = "ALL" Or UCase(MyView) = "CMI" Or UCase(MyView) = "XL"
MyView = InputBox("Enter CMI or XL or ALL", "Enter Desired View")
If vbCancel Then Exit Sub
Loop
..............
.............
End Sub
I want to Exit the Sub if the Cancel Button is pressed.
vbCancel has a value of 2 as soon as I step into the first Sub GetMyView()
How do I reset vbCancel to 0 just before the message box?
Or, how do I exit the Sub (out of the loop) only when the Cancel Button is pressed
but continue the Sub when CMI or XL or ALL is entered?
I know this is basic.