View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Nigel Nigel is offline
external usenet poster
 
Posts: 141
Default find and select a cell



ok it fails on the 2nd line with "Object required message"


Thanks Tom


"Tom Ogilvy" wrote:

Dim rngTemp as Range
For r = 1 To rngB.Rows.Count
If ActiveSheet.Cells(r, 1).Value = "Arc Accesories" Then
Set rngTemp = ActiveSheet.Cells(r, 1)
exit for
end if
Next
if not rngTemp is nothing then
rngTemp.Select
x = EssMenuVZoomIn
else
Msgbox "String was not found"
End If

--
Regards,
Tom Ogilvy

"Nigel" wrote:

I am looking in column A for a specific Phrase and I want to make that the
active cell so I can perform an essbase zoom in, I am using this code but it
doesn't want to work any suggestions

For r = 1 To rngB.Rows.Count
If ActiveSheet.Cells(r, 1).Value = "Arc Accesories" Then
Set rngTemp = ActiveSheet.Cells(r, 1).Range("A1:A1")
x = EssMenuVZoomIn
End If
Next r


Thanks in advance