Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi everybody,
I have the code ... Private Sub Test() Dim Question1 As Variant Dim Question2 As Variant Question1 = MsgBox( _ "Text." & vbNewLine & _ Worksheets("W").Range("B3").Value & vbNewLine _ & vbNewLine & _ "Click YES if either of the following are TRUE :- " & vbNewLine & _ "(1) Text." & vbNewLine & _ "(2) Text." & vbNewLine & _ " (Text)" & vbNewLine _ & vbNewLine & _ "Click NO if either of the following are TRUE :-" & vbNewLine & _ "(1) Text." & vbNewLine & _ "(2) Text.", vbYesNo, "Title") If Question1 < vbYes Then Application.Goto Reference:=Sheets("W").Range("B3") Exit Sub End If Question2 = MsgBox( _ "Text." & vbNewLine _ & vbNewLine & _ "Text." & vbNewLine & _ "Text.", vbYesNo, "Title") If Question2 < vbYes Then Application.Goto Reference:=Sheets("W").Range("B5") Exit Sub End If End Sub .... which unfortunately does NOT goto the correct cell if the answer is NO, it exits the "Test" Sub but still runs the "Main" Sub instead of exiting the "Main" Sub. I call the "Test" Sub above from the beginning of the "Main" Sub. It appears to exit the "Test" Sub but it does NOT exit the "Main" Sub. Any ideas will be greatly appreciated. Thanks in Advance. All the Best. Paul |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
More MsgBox questions. | Excel Discussion (Misc queries) | |||
Answers to questions posing more questions in a workbook | Excel Worksheet Functions | |||
View Questions and Answer to questions I created | Excel Discussion (Misc queries) | |||
msgbox (2 questions) | Excel Programming | |||
Can MsgBox Do This?? | Excel Programming |