M
MCheru
I want to modify this macro so that before it runs, a message box will pop up
and ask are you sure you want to delete? and then have two options yes and
no. If the operator clicks yes the contents will delete. If the operator
clicks no the contents will not be deleted. I know how to get a message box
to come up MsgBox "your message here", but I am not sure how to give it
options. Here is the macro I have now.
Sub ClearContentsMacro Macro ()
Application.Goto Reference:="R7C2"
Range("B7:H116").Select
Selection.ClearContents
Selection.ClearContents
Range("B22").Select
Selection.ClearContents
Range("B33").Select
Selection.ClearContents
Range("B7").Select
End Sub
and ask are you sure you want to delete? and then have two options yes and
no. If the operator clicks yes the contents will delete. If the operator
clicks no the contents will not be deleted. I know how to get a message box
to come up MsgBox "your message here", but I am not sure how to give it
options. Here is the macro I have now.
Sub ClearContentsMacro Macro ()
Application.Goto Reference:="R7C2"
Range("B7:H116").Select
Selection.ClearContents
Selection.ClearContents
Range("B22").Select
Selection.ClearContents
Range("B33").Select
Selection.ClearContents
Range("B7").Select
End Sub