I'm trying to copy/paste date from one range to another. The following code works fine for me until I assign it to a command button. When I assign it to a command button, I get the following error: Run-time error '1001': Method 'Range' of object '_Worksheet' failed
Any thoughts on how to fix this?
Any thoughts on how to fix this?
Code:
Private Sub CommandButton2_Click()
Range("executionbox").Copy
Sheets("tradehistory").Select
Range("tradelist").End(xlDown).Offset(1, 0).Select
ActiveSheet.Paste
ActiveCell.Select
ActiveCell.Value = Date
Sheets("test2").Select
Application.CutCopyMode = False
End Sub