Auto-fill a User Form?

Z0827

New Member
Joined
Nov 3, 2009
Messages
26
I created a user form and I have two fields that I now want to automatically fill with data from same spreadsheet. If I input data into Columns A and B is there a way to have that data populate into my form automatically? The fields are Facility ID and Facility Name. These two fields I will manually input so the user doesn't have to do that step. I'm just not sure how to have them auto populate on the form when they go to insert new data (using the form).

Currently these two fields get entered into the form and populate into the same columns that I can manually input the data.

Hopefully this makes sense. It is kind of hard for me to explain.

Thanks
Zach
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
if the user is entering it then just display what they entered....

eg: user types data in textbox1 and you want it to display into textbox2 and write to A1

private sub cmdenter_click()
thisworkbook.sheets("Sheet1").range("A1").value = textbox1.text
textbox2.text = textbox1.text
end sub
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,718
Members
452,939
Latest member
WCrawford

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