Hi All
I have a UserForm with a ListBox which is populated via RowSource, on clicking on a Customer Name 6 Text Boxes are populated and added to the sheet OK no problem. I have added a ComboBox and it is populated by the "Add Item" method. How would I alter the code below so that if I select Yes in the ComboBox it will fill the Textboxes as below. However if I select No in the ComboBox it will fill the TextBoxes as shown here.
UserForm1.Tb6.Value = Lb1.List(, 7) <<<<< On Choosing No
UserForm1.Tb7.Value = Lb1.List(, 8) <<<<< On Choosing No
On Choosing Yes
Private Sub Lb1_Click()
Sheets("Customers").Select
Dim iRow As Long
Dim ws As Worksheet
Set ws = Worksheets("Customers")
rownum = Lb1.ListIndex
UserForm1.Tb3.Value = Lb1.List(, 3)
UserForm1.TB1.Value = Lb1.List(, 1)
UserForm1.Tb2.Value = Lb1.List(, 2)
UserForm1.Tb4.Value = Lb1.List(, 4)
UserForm1.Tb6.Value = Lb1.List(, 5)
UserForm1.Tb7.Value = Lb1.List(, 6)
'''This works OK'''
End Sub
Any help much appreciated
Cheers
Sooty8.