three line program...
Find returns a range object. So you have to "Set" your variable = to that
range.
Sub test()
Dim Result As Range
Set Result = Sheet1.Cells.Find("1234")
If Not Result Is Nothing Then MsgBox Result.Value & vbTab & Result.Address
End Sub
HTH
"rci" wrote:
Hi all...
why would this fail?
Sheets("Sheet1").Select
Range("A1").Select
Result = Cells.Find("12345") '<-error
Runtime Error 91: Object variable or With block variable not set.
Many thanks!
Mike
|