Hi,
I just need a little help in setting up this Yes/No message box just right. If the user answers 'NO' to my question then I want to return to worksheet "TOC". If the user answers 'Yes' then I want the macro to resume with the rest of the statements that come after the message box.
This is my current code:
Sub YesNoPrintMessageBox()
Dim Answer As String
Dim MyQuestion As String
MyQuestion = "Do you still want to print this report?"
Display MessageBox
Answer = MsgBox(MyNote, vbQuestion + vbYesNo, "???")
If Answer = vbNo Then
(this is not code: IF THE ANSWER IS "NO" THEN I WANT TO RETURN TO Worksheet "TOC")
Else
(this is not code: IF THE ANSWER IS "YES" THEN I WANT THE MACRO TO RESUME WITH THE REST OF THE STATEMENTS THAT COME AFTER THE Msgbox)
End If
End Sub
I just need a little help in setting up this Yes/No message box just right. If the user answers 'NO' to my question then I want to return to worksheet "TOC". If the user answers 'Yes' then I want the macro to resume with the rest of the statements that come after the message box.
This is my current code:
Sub YesNoPrintMessageBox()
Dim Answer As String
Dim MyQuestion As String
MyQuestion = "Do you still want to print this report?"
Display MessageBox
Answer = MsgBox(MyNote, vbQuestion + vbYesNo, "???")
If Answer = vbNo Then
(this is not code: IF THE ANSWER IS "NO" THEN I WANT TO RETURN TO Worksheet "TOC")
Else
(this is not code: IF THE ANSWER IS "YES" THEN I WANT THE MACRO TO RESUME WITH THE REST OF THE STATEMENTS THAT COME AFTER THE Msgbox)
End If
End Sub