I'm convinced that the find method in Excel 97 has problems. I cannot run the same code that runs on Excel 2000. I've tried using different installations of Excel 97 on differenct machines and no luck. I've copied code verbatim from books and the internet and still I get the same error message. run-time error '1004 unable to get find property of the range class.
Can someone shed some light on the find method? Thanks.
Dim rng1 As Range
Dim strCtrlNum As String
strCtrlNum = Application.InputBox("Enter Search String", "Find"
If strCtrlNum = "" Or IsNull(strCtrlNum) Then
Exit Sub
Else
Set rng1 = Cells.Find(What:=strCtrlNum).Activate
If rng1 Is Nothing Then
MsgBox "Can't find" & " " & strCtrlNum
Exit Sub
Else
rng1.Activate
End If
End If
Can someone shed some light on the find method? Thanks.
Dim rng1 As Range
Dim strCtrlNum As String
strCtrlNum = Application.InputBox("Enter Search String", "Find"
If strCtrlNum = "" Or IsNull(strCtrlNum) Then
Exit Sub
Else
Set rng1 = Cells.Find(What:=strCtrlNum).Activate
If rng1 Is Nothing Then
MsgBox "Can't find" & " " & strCtrlNum
Exit Sub
Else
rng1.Activate
End If
End If