Excel VBA + Userforms

IThelp

New Member
Joined
Jan 2, 2017
Messages
32
For my A-Level Coursework I have to design a fully functioning till system which contains staff data and payslips etc. I have designed a userform which enables you to add a new member. within this userform is a lookup box which brings up the persons name when you type their name in. I am trying to get all the data about the person to go into the text boxes on the userform when you double click on the person so their details can be etited. Also i wish for a new row to be created and the new staff data to be entered into that row when you click the add button. Any help with this would be extremely grateful.
many thanks
 
I have data from G11:L37. the VBA code should put data from reg1 into G38 but instead puts it into G2. Another thing is that i have a border going around so i would need new rows added below from G37 so that everthing remains within the border. Hence why I need the code to insert a new row below the last row which should be row 37. The code successfully put the infromation from each reg to the correct columns but not into the correct row.

Now you're talking!

Change the code to this:

Code:
LastRow = Cells(Rows.Count, "G").End(xlUp).Row + 1
 
Upvote 0

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Now you're talking!

Change the code to this:

Code:
LastRow = Cells(Rows.Count, "G").End(xlUp).Row + 1

Thank you awatt,
It now successfully works, thank you so much for your help.

Another query I have for a smiliar userform in a different sheet is that would it be possible to add the data from the userform to a selected row?

again many thanks!
 
Upvote 0

Forum statistics

Threads
1,223,923
Messages
6,175,404
Members
452,640
Latest member
steveridge

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top