Hello everyone
I have followed a tutorial on how to make an input form to get data and store it in another sheet.
I have used the code below. My only problem is that when I run the macro it moves the data on to the sheet that I require but it is to the last row in the table. How can i make it go on 1st available row instead?
![]()
Sub data_input() ws_output = "Current" next_row = Sheets(ws_output).Range("A" & Rows.Count).End(xlUp).Offset(1).Row Sheets(ws_output).Cells(next_row, 1).Value = Range("Person").Value Sheets(ws_output).Cells(next_row, 2).Value = Range("company_name").Value Sheets(ws_output).Cells(next_row, 3).Value = Range("PO_number").Value Sheets(ws_output).Cells(next_row, 4).Value = Range("GL_Code").Value Sheets(ws_output).Cells(next_row, 5).Value = Range("Commence_date").Value Sheets(ws_output).Cells(next_row, 6).Value = Range("Details").Value Sheets(ws_output).Cells(next_row, 7).Value = Range("Cost").Value Range("Person").ClearContents Range("company_name").ClearContents Range("PO_number").ClearContents Range("GL_Code").ClearContents Range("Commence_date").ClearContents Range("Details").ClearContents Range("Cost").ClearContents If Err = 0 Then MsgBox "Save succesfful", vbInformation End Sub
Kind regards,
Gabriel
Bookmarks