auto update text box from combobox in sheet1

Patriot2879

Well-known Member
Joined
Feb 1, 2018
Messages
1,259
Office Version
  1. 2010
Platform
  1. Windows
Hi Good afternoon, i have the code below which doesnt work in the workseet, i have combobox and textbox in sheet1, and the data in sheet 2 the code below works if the combo/textbox was in the userform but it doesn't work if in the worksheet (sheet1) can you help me please.
Code:
Private Sub ComboBox4_AfterUpdate()
   Dim Fnd As Range
   Set Fnd = ThisWorkbook.Sheets("Sheet2").Range("A:A").Find(ComboBox4.Value, , , xlWhole, , , False, , False)
   If Not Fnd Is Nothing Then
      ComboBox2.Value = Fnd.Offset(, 9).Value
      TextBox3.Value = Fnd.Offset(, 2).Value
   End If
End Sub
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Try:
Code:
     Sheets("Sheet1").ComboBox2.Value = Fnd.Offset(, 9).Value
     Sheets("Sheet1").TextBox3.Value = Fnd.Offset(, 2).Value
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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