I have a simple macro that after copying data from a cell it when executed pastes the values only. but if i run this macro without first copying any data i get the runtime error '1004' message.
Can someone help me with a line i can put in the below code to stop this happening?
Cheers
Can someone help me with a line i can put in the below code to stop this happening?
Code:
answer = MsgBox("Are You Sure You Would Like To Paste Values Only?", vbYesNo)
If answer <> vbYes Then Exit Sub
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
End Sub
Cheers