lezawang
Well-known Member
- Joined
- Mar 27, 2016
- Messages
- 1,805
- Office Version
- 2016
- Platform
- Windows
Hi
I created 2 command buttons one to copy whatever cells are selected using the mouse and then another button to paste them in another selected area/cells. I am getting error message (not accepting Selection.paste). Please see code below. Also can I ask you what "Selection" is? is it an object or what. I could not find it listed under objects list.
Thanks
Private Sub CommandButton1_Click()
Selection.Copy
End Sub
Private Sub CommandButton2_Click()
Selection.Paste
End Sub
I created 2 command buttons one to copy whatever cells are selected using the mouse and then another button to paste them in another selected area/cells. I am getting error message (not accepting Selection.paste). Please see code below. Also can I ask you what "Selection" is? is it an object or what. I could not find it listed under objects list.
Thanks
Private Sub CommandButton1_Click()
Selection.Copy
End Sub
Private Sub CommandButton2_Click()
Selection.Paste
End Sub