Input Form to Get Data and Store it in Another Tab in Excel
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?
Re: Input Form to Get Data and Store it in Another Tab in Excel
Administrative Note:
Welcome to the forum.
We would very much like to help you with your query, however you need to include code tags around your code.
Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.
Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
(Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
Re: Input Form to Get Data and Store it in Another Tab in Excel
Hi GPetcu,
You need to get a different value for next_row .
Unfortunately, without seeing your table, we cannot give you an answer.
Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.
Remember to desensitize the data.
Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
How can i make it go on 1st available row instead?
As a VBA beginner starter :
PHP Code:
Sub data_input() With Sheets("Current") IIf(IsEmpty(.[A2]), .[A2], .[A1].End(xlDown)(2)).Resize(, 7).Value = _ Array([Person], [company_name], [PO_number], [GL_Code], [Commence_date], [Details], [Cost]) End With [Person,company_name,PO_number,GL_Code,Commence_date,Details,Cost].ClearContents End Sub
► Do you like it ? ► ► So thanks to click on bottom left star icon « ★ Add Reputation » !
Last edited by Marc L; 03-27-2020 at 06:36 PM.
Reason: optimization …
Bookmarks