Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If .Find result is nothing then it will give that error, because of the
last .Activate part. If no match is found it is not referring to any cell, so .Active for nothing will give that error. Change the code as under & try: Dim myRange As Range Set myRange = .Find(What:="*/*/2004", After:=ActiveCell, LookIn:=xlValues, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False) If Not myRange Is Nothing Then myRange.Activate Sharad *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Runtime Error '91' Object variable or With block variable not set | Excel Discussion (Misc queries) | |||
Error 91 -- Object variable or With block variable not set | Excel Programming | |||
Cells.Find error Object variable or With block variable not set | Excel Programming | |||
"Run-time error 91: Object variable or With block not set" | Excel Programming | |||
Error 91 - Object variable with block variable not set | Excel Programming |