Looked around and tried to modify existing code but without success.
I have a workbook with a command button.
When i press the button i want to copy the data and paste it in another workbook.
But it has to be on the first available empty row, so that i dont destroy the old data.
So far the code looks like this:
Private Sub CommandButton1_Click()
'This is the data i want to copy
Range("E3:M8").Select
Selection.Copy
'Open the workbook which i want to paste into
Workbooks.Open "O:\abc\def\ghi.xlsx"
' Select the sheet and range A1
Application.Goto Workbooks("NPD Beläggningsprofil.xlsx").Sheets("DATA").Range("A1")
--
Now i want to find the first empty row on the sheet "DATA" and paste or copy the code from the other worksheet.
If the first cell in the row is empty, then i consider the whole row as empty and can be written data to.
Any suggestions and pointers are much appreciated!
I have a workbook with a command button.
When i press the button i want to copy the data and paste it in another workbook.
But it has to be on the first available empty row, so that i dont destroy the old data.
So far the code looks like this:
Private Sub CommandButton1_Click()
'This is the data i want to copy
Range("E3:M8").Select
Selection.Copy
'Open the workbook which i want to paste into
Workbooks.Open "O:\abc\def\ghi.xlsx"
' Select the sheet and range A1
Application.Goto Workbooks("NPD Beläggningsprofil.xlsx").Sheets("DATA").Range("A1")
--
Now i want to find the first empty row on the sheet "DATA" and paste or copy the code from the other worksheet.
If the first cell in the row is empty, then i consider the whole row as empty and can be written data to.
Any suggestions and pointers are much appreciated!