Hi Guys
im currently creating an excel database type spreadsheet and have a form with a textbox and a button. The code behind the button is as follows:
Code
Sub find_Click()
Dim strFind
Dim rSearch As Range
Set rSearch = Sheet1.Range("A2:A1000")
strFind = Me.txtpolicy.Value
If strFind = NullString Then GoTo error1
With rSearch
Set c = .find(strFind, LookIn:=xlValues)
If Not c Is Nothing Then
c.Select
Else
MsgBox "No match was found. Please try again"
End If
End With
error1:
End Sub
Display More
The error message I get is select method of Range class failed
Debugging highlights the c.select line
Anyone know why this is?
Thanks in advance
Jamie