Mohammad Ishaq
Member
I have an excel sheet name "Data" .This Excel sheet having the following opjects.
1. User Form name "utBilsForm"
2.A multipage whith a first page name page1.
3.One Cobobox name combobox10 and two textboxes name textbox27 and textbox28.
4 One submit button.
I have data on three columns J,K and L.The data starts from column J9 , K9 and L9.I have already populated the combobox with the item on J column.
Now i want that when an item is selected from the combobox , the two textboxes fill with the data starts from K9 and L9 accordingly.
I have write the following code in combobox click event, but it is not working.Please guide me .
Thanks
1. User Form name "utBilsForm"
2.A multipage whith a first page name page1.
3.One Cobobox name combobox10 and two textboxes name textbox27 and textbox28.
4 One submit button.
I have data on three columns J,K and L.The data starts from column J9 , K9 and L9.I have already populated the combobox with the item on J column.
Now i want that when an item is selected from the combobox , the two textboxes fill with the data starts from K9 and L9 accordingly.
I have write the following code in combobox click event, but it is not working.Please guide me .
Code:
Dim i As Long, LastRow As Long, ws As Worksheet
Set ws = Sheets(“Data”)
LastRow = ws.Range(“J” & Rows.Count).End(xlUp).Row
For i = 9 To LastRow
Me.TextBox27 = ws.Cells(i, “K”).Value
Me.TextBox28 = ws.Cells(i, “L”).Value
Next i
Thanks