allstarsosa
New Member
- Joined
- Dec 5, 2018
- Messages
- 2
Currently I have a pretty basic commandbutton that copies a range of data from my "import" sheet to a row in my "Main" sheet. What I am trying to now do is have the row on my "Main" sheet increase by 1 each time I click this button. So the first time I press this button the data will copy and paste to A10 on "Main", then next time i press the button it will paste to A11 on "Main" and so on, A12, A13, Etc... Whether this is even possible im not sure.
Code:
Private Sub CommandButton1_Click() Application.ScreenUpdating = False
Dim copySheet As Worksheet
Dim pasteSheet As Worksheet
Set copySheet = Worksheets("Import")
Set pasteSheet = Worksheets("Main")
copySheet.Range("E4:AA4").Copy
pasteSheet.Range("A10").PasteSpecial xlPasteValues
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub