A GoTo statement with a condition
Sub gotoDemo() Dim Response As Integer Response = MsgBox("Do you want to create a daily report for " & _ "the head office from the current document?", _ vbYesNo + vbQuestion, "Create Daily Report") If Response = vbNo Then GoTo Bye Bye: End Sub