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

I'm having a strange problem with by VBA environment; Excel XP. Whenever I'm
running some code and an error occurs, the procedure just drops out. No
error message is raised so it's making debugging very difficult! The error
option is set to 'Break on Unhandled Errors' as per usual, but no breaks
actually occur?

If I create a sub with a divide by zero error in the same module, then the
run-time error does occur, so I'm really confused. Why would run-time errors
behave one way in one sub, but a different way in another. And yes, no error
handler has been engaged (ie neither sub has an On Error Goto statement).

Any ideas?

Thanks


Damien

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default Error problem

I vaguely recall running into something similar a long time ago and no
satisfactory explanation as to why. You might want to search the
google.com archives of the xl newsgroups. Alternatively, step through
the code with F8 (or SHIFT+F8 when appropriate) and see where XL/VBA
just quits.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
I'm having a strange problem with by VBA environment; Excel XP. Whenever I'm
running some code and an error occurs, the procedure just drops out. No
error message is raised so it's making debugging very difficult! The error
option is set to 'Break on Unhandled Errors' as per usual, but no breaks
actually occur?

If I create a sub with a divide by zero error in the same module, then the
run-time error does occur, so I'm really confused. Why would run-time errors
behave one way in one sub, but a different way in another. And yes, no error
handler has been engaged (ie neither sub has an On Error Goto statement).

Any ideas?

Thanks


Damien


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 595
Default Error problem

Damien

I seem to remember that happening to me, but don't remember the details.
What kind of error do you expect but aren't getting? Are the errors in a
class module like a userform, Sheet1, ThisWorkbook or a custom class module?

--
Dick Kusleika
Excel MVP
Daily Dose of Excel
www.dicks-blog.com

Damien wrote:
I'm having a strange problem with by VBA environment; Excel XP.
Whenever I'm running some code and an error occurs, the procedure
just drops out. No error message is raised so it's making debugging
very difficult! The error option is set to 'Break on Unhandled
Errors' as per usual, but no breaks actually occur?

If I create a sub with a divide by zero error in the same module,
then the run-time error does occur, so I'm really confused. Why
would run-time errors behave one way in one sub, but a different way
in another. And yes, no error handler has been engaged (ie neither
sub has an On Error Goto statement).

Any ideas?

Thanks


Damien



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Error problem

I believe I have this occasionally. No error message, but the name of the
procedure is sometimes highlighted in yellow (rather than a line of code).
As I recall (and I could be mistaken) it is usually an event procedure.
Also, it seems the error is immediate on running.

In such cases, having just made changes, the cause is usually found after
careful inspection. I rarely step through my code, so I can't say if that
would be a better suggestion or not.

--
Regards,
Tom Ogilvy





"Dick Kusleika" wrote in message
...
Damien

I seem to remember that happening to me, but don't remember the details.
What kind of error do you expect but aren't getting? Are the errors in a
class module like a userform, Sheet1, ThisWorkbook or a custom class

module?

--
Dick Kusleika
Excel MVP
Daily Dose of Excel
www.dicks-blog.com

Damien wrote:
I'm having a strange problem with by VBA environment; Excel XP.
Whenever I'm running some code and an error occurs, the procedure
just drops out. No error message is raised so it's making debugging
very difficult! The error option is set to 'Break on Unhandled
Errors' as per usual, but no breaks actually occur?

If I create a sub with a divide by zero error in the same module,
then the run-time error does occur, so I'm really confused. Why
would run-time errors behave one way in one sub, but a different way
in another. And yes, no error handler has been engaged (ie neither
sub has an On Error Goto statement).

Any ideas?

Thanks


Damien





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 595
Default Error problem

Tom Ogilvy wrote:
I believe I have this occasionally. No error message, but the name
of the procedure is sometimes highlighted in yellow (rather than a
line of code). As I recall (and I could be mistaken) it is usually an
event procedure.


If that's the case here, I wonder if checking "Break in Class Modules" would
expose the error better. Maybe where the error is is just being masked.

--
Dick Kusleika
Excel MVP
Daily Dose of Excel
www.dicks-blog.com


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
Error problem Ayo Excel Discussion (Misc queries) 11 May 20th 09 04:52 PM
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Worksheet Functions 1 May 3rd 08 02:35 PM
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Discussion (Misc queries) 1 May 3rd 08 10:52 AM
Problem with #VALUE/0! error Ted Excel Worksheet Functions 2 November 22nd 05 03:37 PM
Unknown where is the problem on the Runtime error - Automation error wellie Excel Programming 1 July 10th 03 08:12 AM


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