Error Handling - Infinite loop

C

coder_arun

Hi

My "Excel 4 Macro" Error handler goes into a infinite loop, i'm no
sure why

My macro code is

Under Auto Open I define the error handler as below

AUTO_OPE
=ERROR(2;RECOVER

The Error Handler

RECOVE
=GOTO(ABSREF(\"R[1]C[0]\";LAST.ERROR())
=RETURN(

Any help on why dose this error handler go into a infinite loop????

Many Thanks in Advance
Aru
 
K

keepITcool

Arun, why go to all the trouble of learning obsolete XLM macro's?
Makes more sense to learn VBA...

The infinite loop is caused by an error in the error handler itself.
the r1c1 address s/b "R[1]C" not "R[1]C[0]\"

Also it makes more sense to use the offset function,
rather than a double conversion (ref->txt>ref))

=GOTO(OFFSET(LAST.ERROR(),1,0))

forget the =return() in the error handler:
excel will never reach it.


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


coder_arun wrote in
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top