Upon the push of a button, a message appears. There is a yes/no select option. Problem is, both buttons perform the same function (that of the yes button). I need the "no" button to stop the macro and take me back to the jump off point. The macro reads:
Public Sub Message()
Dim Msg, Style, Title, Response, MyString
Msg = "If you select YES all summary information will be erased. Select NO to return to Control Panel." ' Define message.
Style = vbYesNo + vbCritical + vbDefaultButton2 ' Define buttons.
Title = "WARNING" ' Define title.
' Display message.
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then ' User chose Yes.
Range("K7:AJ25").Select
ActiveWindow.ScrollColumn = 7
Selection.Copy
Application.CutCopyMode = False
Selection.ClearContents ' Perform some action.
Else ' User chose No.
MyString = "No" ' Perform some action.
End If
End Sub
Bookmarks