I'm trying to create a simple search tool in Excel 97. Let me preface my problem by saying the following code works perfectly in Excel 2000. But in Excel 97, I receive the following error: run time error '1004' unable to get the find property of the range class. Here's the code, please help! I've already checked the microsoft site.
Dim rg1 As Range
Dim stringToFind As String
'-- this sub finds a control number
stringToFind = _
Application.InputBox("Enter Search", "Find"
' Set an object variable to evaluate the Find command.
Set rg1 = ActiveSheet.Columns(1).Find(What:=stringToFind)
' If the string is not found, show this message box.
If rg1 Is Nothing Then
MsgBox "Search Value Not Found.", vbExclamation
Else
rg1.Activate
End If
Dim rg1 As Range
Dim stringToFind As String
'-- this sub finds a control number
stringToFind = _
Application.InputBox("Enter Search", "Find"
' Set an object variable to evaluate the Find command.
Set rg1 = ActiveSheet.Columns(1).Find(What:=stringToFind)
' If the string is not found, show this message box.
If rg1 Is Nothing Then
MsgBox "Search Value Not Found.", vbExclamation
Else
rg1.Activate
End If