Hi guys,
I've found this bit of code that I'd quite like to use but rather than having the values show up in a listbox, I'd like them to be selected from a combobox.
Can someone provide assistance please?
Thanks,
Dom
Private Sub ListBox1_Click()
Dim vreg As String, drow As Integer, c As Range
Let vreg = ListBox1.Value
With Sheets("sheet1").Range("C2:C100")
Set c = .Find(vreg, LookIn:=xlValues, lookat:=xlWhole)
If Not c Is Nothing Then
drow = c.Row
End If
End With
With Me
.txtFName.Value = Sheets("sheet1").Cells(drow, 1).Value
.txtLName.Value = Sheets("sheet1").Cells(drow, 2).Value
.txtsb.Value = Sheets("sheet1").Cells(drow, 3).Value
.txtloan.Value = Sheets("sheet1").Cells(drow, 4).Value
.txtopen.Value = Sheets("sheet1").Cells(drow, 5).Value
End With
End Sub
Bookmarks