Hi
I have looked at the threads that have this heading but cannot see one that matches my situation and after looking at them all I am now confused
any help would be great
my code is
Private Sub cboName_Change()
Dim Found As Range
Dim str As String
str = Me.cboName.Value
Set Found = Sheet2.Range("D9", Range("D" & Rows.Count).End(xlUp)).Find(str) this is where i get the error when it searches the name selected
If Found Is Nothing Then
MsgBox ("Not Found!")
Else
Me.txtStart = Found.Row
Me.txtHours = Cells(Found.Row, 3).Value
Me.txtnumber = Cells(Found.Row, 5).Value
Me.txtDepartment = Cells(Found.Row, 6).Value
Me.txtSex = Cells(Found.Row, 7).Value
Me.txtFIREWARDEN = Cells(Found.Row, 9).Value
Me.txtFIRSTAID = Cells(Found.Row, 10).Value
Me.txtHr = Cells(Found.Row, 11).Value
Me.txtCold = Cells(Found.Row, 13).Value
End If
End Sub
I have looked at the threads that have this heading but cannot see one that matches my situation and after looking at them all I am now confused
any help would be great
my code is
Private Sub cboName_Change()
Dim Found As Range
Dim str As String
str = Me.cboName.Value
Set Found = Sheet2.Range("D9", Range("D" & Rows.Count).End(xlUp)).Find(str) this is where i get the error when it searches the name selected
If Found Is Nothing Then
MsgBox ("Not Found!")
Else
Me.txtStart = Found.Row
Me.txtHours = Cells(Found.Row, 3).Value
Me.txtnumber = Cells(Found.Row, 5).Value
Me.txtDepartment = Cells(Found.Row, 6).Value
Me.txtSex = Cells(Found.Row, 7).Value
Me.txtFIREWARDEN = Cells(Found.Row, 9).Value
Me.txtFIRSTAID = Cells(Found.Row, 10).Value
Me.txtHr = Cells(Found.Row, 11).Value
Me.txtCold = Cells(Found.Row, 13).Value
End If
End Sub