Hi All,
I dont know why im getting a type mismatch 13 error
(TxtEmpID.Text is a textbox on my userform)
Thank You
I dont know why im getting a type mismatch 13 error
(TxtEmpID.Text is a textbox on my userform)
Thank You
Code:
Private Sub CmdAddRecord_Click()
Dim Found As Range
Set ws = Sheets("Sheet1")
LRow = ws.Range("A" & Rows.Count).End(xlUp).Row
With ws.Range("E6:E" & LRow)
Set Found = .Find(What:=TxtEmpID.Text, After:=.Range("E6"), _
LookIn:=xlValues, lookat:=xlWhole, SearchOrder:=xlNext, _
MatchCase:=False, SearchFormat:=False)
If Not Found Is Nothing Then
Adr1 = Found.Address
Else
MsgBox "Name could not be found"
Exit Sub
End If
End With
End Sub