How can I have my code check if the clipboard is empty so this code won't error out in that case?
My current code:
Code:
Private Sub CommandButton2_Click()
Application.ScreenUpdating = False
Sheet44.Activate
Sheet44.Cells(1, 1).Select
Sheet44.Paste
Sheet12.Activate
Sheet12.Range("C12:J12").Value = Sheet44.Range("A1:H1").Value
Sheet44.Cells.Clear
Application.ScreenUpdating = True
End Sub
Someone already suggested trying:
Code:
If Application.CutCopyMode > 0 Then
but it prevents the code from doing anything even if there is something on the clipboard.