Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error in run time but fine while tracing

Status
Not open for further replies.

PaghPagh

Technical User
Aug 10, 2007
2
US
Hi All,
I have wriiten a small VBA and sometimes I receive error and when I press 'Debug' and trace the macro, there is no error.
In fact I have seen this before also.
Any Idea of what causes the error?
Any workaround?

Thanks
 
Which error on which code in which application ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Sorry If my question was not clear.
I meant any error which comes in the run time but does not show up in the debug stage.
When I press F5 I do get that error but when running by F8 no error happens and everthing is fine.
 
Again, which code in which application ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
PaghPagh,

It would be helpful (and certainly courteous) if you answered PHV's question as to which application is involved, but I understand you may not be receiving an actual quotable error message. I had a similar problem a while back in Excel and no one could figure out what was wrong. The code would step-through and work during debug, it would compile, but it wouldn't run when called from a worksheet. It was finally resolved when I copied the code into the body of a Word document, deleted the code from the ThisWorkbook module in Excel, saved the workbook with no code, reopened it, and then copied the code back into the ThisWorkbook module.

Since that time my code has worked flawlessly, and I still have no idea why it wouldn't work in the first place. The method noted above was an act of sheer desperation on my part when nothing else helped. It seems this may be another bit of "have to live with it" coding from the boys in Redmond.

----------------------------------------------------------------------------------
"A committee is a life form with six or more legs and no brain." -- L. Long
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top