PDA

View Full Version : how to lookup combo box into textbox in excel VBA



dawood
02-08-2020, 08:13 PM
Hi guys

Hope you are doing good.

I have gotten the attached Excel sheet from internet and modified as per my requirement.

But i having problem with some textbox which i (located in the sheet name "MAIN")newly added and does not populate the item description while the item code selected in combo box.

If any one kindly solve this issue,it would be a great favor for me.

Thanks

Dawood

Paul_Hossler
02-08-2020, 09:04 PM
Can't get past the username and password userform

Also the project is protected

dawood
02-09-2020, 12:23 PM
Can't get past the username and password userform

Also the project is protected

Please ignore the previous file consider this as final.

login credentials
username: 1
password: 1


VBA password:
1

Paul_Hossler
02-09-2020, 01:37 PM
If I understand correctly ...

25953



Private Sub cmbItem_Change()
Me.txtPrice.Text = Application.WorksheetFunction.VLookup(cmbItem.Value, Worksheets("Items").Range("A:C"), 2, False)
Me.txtDescription.Text = Application.WorksheetFunction.VLookup(cmbItem.Value, Worksheets("Items").Range("A:C"), 3, False)
End Sub




I recreated and renamed your 2 textboxes since there seemed to be something messed up with one

Also changed your descriptions so I could make sure the right one was selected