Private Sub Image1_Click()
'go look for the CLS account in the worksheet data of this workbook
Dim ws As Worksheet: Set ws = Sheets("data")
Dim rFind As Range
Dim i As Integer
Set rFind = ws.Range("B1:B" & ws.Range("B" & Rows.Count).End(xlUp).Row).Find(What:=txt1.Text, LookIn:=xlValues, LookAt:=xlWhole)
If Not rFind Is Nothing Then
txt2.Value = ws.Range("C" & rFind.Row).Value
txt3.Value = ws.Range("D" & rFind.Row).Value
txt4.Value = ws.Range("E" & rFind.Row).Value
txt5.Value = ws.Range("I" & rFind.Row).Value
txt6.Value = ws.Range("H" & rFind.Row).Value
txt7.Value = ws.Range("F" & rFind.Row).Value
txt8.Value = ws.Range("K" & rFind.Row).Value
txt9.Value = ws.Range("J" & rFind.Row).Value
txt10.Value = ws.Range("L" & rFind.Row).Value
End If
End Sub
Bookmarks