View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
RB Smissaert RB Smissaert is offline
external usenet poster
 
Posts: 2,452
Default Excel Find Method

This works with me:

Sub test()

Dim rngCol As Range
Dim rng As Range

Set rngCol = Columns(1)

Set rng = rngCol.Find(What:="test", _
After:=Cells(1), _
LookIn:=xlValues, _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False, _
SearchFormat:=False)

If Not rng Is Nothing Then
MsgBox rng.Address
End If

End Sub

RBS



"JonWayne" wrote in message
. ..
I get the error, "Unable to get the Find property of the Range class",
whenever I use the Find method in Excel VBA. This is my usage:

Set rngTemp = rngCol1.Find("Party Name:", "A1", xlValues, xlPart,
xlByRows,
xlNext, False)

Any ideas?