P
PCH
How do I include a cells value in a message box?
i.e.
Msg = "Are you sure you want to delete Quantities? & Cell (A1) Value Here"
Sub Macro1()
Dim Msg, Style, Title, Response, MyString
Msg = "Are you sure you want to delete Quantities? " ' Define message.
Style = vbYesNo + vbExclamation + vbDefaultButton2 ' Define buttons.
Title = "Last Chance!!!" ' Define title.
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then
Range("B7:B27,B30:B40,B43:B51,B54:B66,D713,D16,D1950,D5366,F7:F60,i3").
_
Select
Range("F7").Activate
Selection.ClearContents
Range("B33").Select
Else ' do nothing.
End
End If
End Sub
i.e.
Msg = "Are you sure you want to delete Quantities? & Cell (A1) Value Here"
Sub Macro1()
Dim Msg, Style, Title, Response, MyString
Msg = "Are you sure you want to delete Quantities? " ' Define message.
Style = vbYesNo + vbExclamation + vbDefaultButton2 ' Define buttons.
Title = "Last Chance!!!" ' Define title.
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then
Range("B7:B27,B30:B40,B43:B51,B54:B66,D713,D16,D1950,D5366,F7:F60,i3").
_
Select
Range("F7").Activate
Selection.ClearContents
Range("B33").Select
Else ' do nothing.
End
End If
End Sub