Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel
AC AC is offline
external usenet poster
 
Posts: 7
Default Error does not appear to get directed to the OnError code.

Hi

We are having a problem with error trapping in Excel.

We have code which says On Error goto xyz, which looks for a specific
error and deals with it. It then returns back to the code where it
trapped the error.

We expect to see this error multiple times in the code execution. The
code being used is something like:

set myCell = Cells(i,j)

on error goto xyz
sMyString = myCell.Formula


Not all cells have formulas and so it throws an error sometimes, and
that's fine by us [we are trying to find the cells with formulas]

The first time it throws an error on the sMyString line it correctly
goes to our error label xyz and then gets returned back into the
loop. However the 2nd time it throws an error it pops up the error
box rather than jumping to the error handling code again.


Can someone shed some light?

Thanks
Andy C
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
Macros Being Re-Directed Risky Dave Excel Programming 0 May 28th 09 11:37 AM
OnError - what generated the error? Robeyx via OfficeKB.com Excel Programming 6 August 11th 08 11:48 AM
How to trap an error with onError in a for i loop Kevin Excel Programming 2 April 12th 07 10:36 PM
Programming a Directed Flow Chart RJB Excel Programming 5 March 19th 07 10:21 PM
User directed graphing? wadep Excel Programming 0 November 10th 04 05:38 AM


All times are GMT +1. The time now is 11:26 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"