update textbox from sheet1 in userform

Patriot2879

Well-known Member
Joined
Feb 1, 2018
Messages
1,081
hi good afternoon, hope you can help. i have a userform and a sheet1 where data is stored from columns A to S. and in my userform i have 19 textboxes and a listbox. the textboxes is where i can add data and save into sheet1 this also populates the information in the listbox so i can see it easily, i can also click on a row in the listbox and this brings up the data in textbox1 to textbox7. Textbox10 to textbox19 doesnt populate with any data, i was wondering if there is any way once i click on a row in the listbox to do a vlookup the data for these 10 textboxes is in sheet1 columns H to S to populate my data into these 10 textboxes? i have added my file to dropbox hopefully it makes sense when you see it. i think i need something like this: - vlookup to look up textbox1 in userform and find in sheet1 and input into textbox10 to textbox19 (textbox1 has the date which i can use as the reference.)

 

Some videos you may like

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

Patriot2879

Well-known Member
Joined
Feb 1, 2018
Messages
1,081
some code like this maybe ? but this doesnt work but this is something like what i need i think? how do i add userform1 in this? would i t be right when thats added?
VBA Code:
Private Sub TextBox10_Change()
TextBox1.Value = Sheets ("sheet1").VLookup(TextBox10.Value, Range("H"), False)
End Sub
 
Last edited:

Patriot2879

Well-known Member
Joined
Feb 1, 2018
Messages
1,081
Hi hope you can help? Basically what I want is for when I got data in textbox1 to vlookup in sheet1 find the data in textbox1 which is in column a find the data in column h and put that information in textbox10 in userform1. Hope this makes more sense
 

Patriot2879

Well-known Member
Joined
Feb 1, 2018
Messages
1,081
i think my questions sounds abit confusing so i try again and hope you can help.
userform to vlookup value from textbox1 in sheet("sheet1") values found in column a & return value in another textbox10 value found in column h
 

Patriot2879

Well-known Member
Joined
Feb 1, 2018
Messages
1,081

ADVERTISEMENT

hi good morning, i hope someone can help me please? i am really stuck on this, if you need more information please ask
 

NoSparks

Well-known Member
Joined
Mar 15, 2013
Messages
1,043
Office Version
  1. 2010
Platform
  1. Windows
How about providing a link to your file that doesn't require signing in
 

NoSparks

Well-known Member
Joined
Mar 15, 2013
Messages
1,043
Office Version
  1. 2010
Platform
  1. Windows
Yes, thank you. Will have a look.
 

NoSparks

Well-known Member
Joined
Mar 15, 2013
Messages
1,043
Office Version
  1. 2010
Platform
  1. Windows
In UserForm_Initialize load all the columns into the listbox and change .ColumnCount to 7 if that's all you want to show
Rich (BB code):
Set rng = ws.Range("A1:S" & ws.Range("A" & ws.Rows.Count).End(xlUp).Row)

Load all the textboxes in ListBox1_AfterUpdate
 

Watch MrExcel Video

Forum statistics

Threads
1,122,356
Messages
5,595,681
Members
414,009
Latest member
SNesbyCarr

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
Top