Import to UserForm Textbox with Lookup

03856me

Active Member
Joined
Apr 4, 2008
Messages
297
I believe this is possible, because you guys can figure out anything!

I have an Excel database that contains many userforms with textboxes (filename = master1.xlsm). Based on the value in txt_date on Frm-Import, I would like to be able to retreive data from another Excel database and import values into textboxes on the userform. Something like this:

txt_date value = 05/16/2011 and once I would press macro button it would import like so:

it would look for the date in c:\filename\Table1[date] and import from that row into the following:

textbox1 = import from c:\filename\Table1[Hours]
textbox2 = import from c:\filename\Table1[SThrs]
textbox3 = import from c:\filename\Table1[OThrs]
textbox4 = import from c:\filename\Table1[Rate]

Is this possible? If yes, could someone point me to some code that would get me started. I have researched the web and several site, including Mr.Excel and can't find anything close to this.

Thank you for helping,
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Forum statistics

Threads
1,224,599
Messages
6,179,831
Members
452,946
Latest member
JoseDavid

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