Hi I have the following code, but I don't want it to carry on after line 4 if there is nothing in the clipboard to paste instead I want it to come up with the following message and then end sub:
MsgBox "Nothing to paste!"
Sub Button4_Click()
Dim last_row As Integer
Cells(Rows.Count, 3).End(xlUp).Offset(1, -1).PasteSpecial Paste:=xlPasteValues
'Selection.PasteSpecial Paste:=xlPasteValues'
ActiveCell.Copy
ActiveCell.Offset(0, 23).Select
Selection.PasteSpecial Paste:=xlPasteValues
End Sub
many thanks
Bookmarks