G
Gerrit Van Stempvoort
I made a VB macro for excel. I recorded the following "Find" function
and copied it into the macro:
Cells.Find(What:="Time", After:=ActiveCell, LookIn:=xlFormulas,
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:=False, SearchFormat:=False).Activate
When I run the macro I got an error message:
"Error 91
Objectvariable or blockvariable With not defined."
When I replace "LookAt:=xlWhole" by "LookAt:=xlPart", then the macro
runs well, but will find the wrong cell.
What's wrong?
I don't use any "With" function in the macro.
Thanks beforehand for your help.
*** Sent via Developersdex http://www.developersdex.com ***
and copied it into the macro:
Cells.Find(What:="Time", After:=ActiveCell, LookIn:=xlFormulas,
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:=False, SearchFormat:=False).Activate
When I run the macro I got an error message:
"Error 91
Objectvariable or blockvariable With not defined."
When I replace "LookAt:=xlWhole" by "LookAt:=xlPart", then the macro
runs well, but will find the wrong cell.
What's wrong?
I don't use any "With" function in the macro.
Thanks beforehand for your help.
*** Sent via Developersdex http://www.developersdex.com ***