Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Error Handling - Infinite loop


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

--
coder_aru
-----------------------------------------------------------------------
coder_arun's Profile: http://www.excelforum.com/member.php...fo&userid=3381
View this thread: http://www.excelforum.com/showthread.php?threadid=56822

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Error Handling - Infinite loop

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-txtref))

=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
<news:<coder_arun.2c06xp_1154674504.4752@excelforu m-nospam.com


Hi,

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

My macro code is:

Under Auto Open I define the error handler as below:

AUTO_OPEN
=ERROR(2;RECOVER)

The Error Handler:

RECOVER
=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.
Arun

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Infinite Loop in Error Handler chris Excel Discussion (Misc queries) 2 September 18th 07 02:10 AM
Error Handling - Infinite loop coder_arun[_6_] Excel Programming 0 August 3rd 06 01:38 PM
Newbie Q: Error handling procedures in a loop KR Excel Programming 2 March 4th 05 05:51 PM
HELP!!!! Can't stop a loop (NOT an infinite loop) TBA[_2_] Excel Programming 3 December 14th 03 03:33 PM
Infinite Loop Steve Wylie Excel Programming 1 December 3rd 03 02:02 PM


All times are GMT +1. The time now is 10:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"