Forum Discussion
bideha
Jan 20, 2020Copper Contributor
How to make a form to fill the first blank row instead of the first row of a table.
In Excel forms, when selecting the forms options and entering the data, the data is entered in the first row of the table. I need the form to enter the data from the blank row of the table so that the data may be entered in the same table after multiple application closures.
7 Replies
- PascalKTeamIron ContributorI would define a variable called "last row" which gives me the number of the last row.
You can use this line of code to do that:
lastRow = Cells(Rows.Count, 1).End(xlUp).Row
now to add data from the userform you can use something like this
Cells(lastRow, 1) = me.nameoftheelementfromyouruserform
If this doesn't help, please upload the excel file so I can take a look at it- bidehaCopper Contributor
Thank you for your reply. I have attached the worksheet of the form and attached the trouble that I am having.
- PascalKTeamIron ContributorThe vba code is not saved in this document but in E:\Work documents\OneDrive - Quest Pharmaceuticals Pvt. Ltd\Work documents\Performance appraisal and Operations management\Draft for the activities and task list-macro enabled.xlsm'!New_data_entry
First you sould include the code into your actual file.
Also I don't really understand the requirement that you mention in the file, sorry