Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2003/vbx macro errors.
I'm developing some vba macros under excel 2003 and am (naturally) getting
errors. Compile time errors highlight the offending line, but seemingly not run time errors. All I'm getting is a helpful message eg 'Invalid procedure call or argument' but no clue as to which line of code is giving this. Isn't it possible to get the environment to highlight the offending source line? There must be a better way than a liberal sprinkling of print and msgbox diagnostics. regards Phil B |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2003/vbx macro errors.
"Phil B" <phil.remove.brady@hotmail dot co dot united kingdom wrote in
message ... I'm developing some vba macros under excel 2003 and am (naturally) getting errors. Compile time errors highlight the offending line, but seemingly not run time errors. All I'm getting is a helpful message eg 'Invalid procedure call or argument' but no clue as to which line of code is giving this. Isn't it possible to get the environment to highlight the offending source line? There must be a better way than a liberal sprinkling of print and msgbox diagnostics. Hi Phil - are you using [ On Error .... ] statements in your code? For initial debugging you might comment them all out so that VBA will give you the option of dropping into the debugger on an error ... and then the error line will be highlighted for you. If that doesn't help, the message indicates that your code is calling a sub or function and the call is failing ... perhaps you wrote the procedure with a required parameter and your call isn't providing it. My standard technique for tracking down " strange " errors is exactly what you mention .. judicious (liberal ?) use of debug.print (I sometimes use msgbox, but generally prefer the print. You should be able to identify "milestones" in your code this way, and narrow down your investigation area. -- Clif McIrvin (clare reads his mail with moe, nomail feeds the bit bucket :-) |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2003/vbx macro errors.
Under Tools | Options | General (tab) in the VBE, change Break on unhandled errors to Break on all errors. -- Jim Cone Portland, Oregon USA http://www.mediafire.com/PrimitiveSoftware (Formats & Styles: lists/removes unused styles & number formats - in the free folder) "Phil B" <phil.remove.brady@hotmail dot co dot united kingdom wrote in message ... I'm developing some vba macros under excel 2003 and am (naturally) getting errors. Compile time errors highlight the offending line, but seemingly not run time errors. All I'm getting is a helpful message eg 'Invalid procedure call or argument' but no clue as to which line of code is giving this. Isn't it possible to get the environment to highlight the offending source line? There must be a better way than a liberal sprinkling of print and msgbox diagnostics. regards Phil B |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2003/vbx macro errors.
thanks! that's exactly what I was looking for!
Phil "Jim Cone" wrote in message ... Under Tools | Options | General (tab) in the VBE, change Break on unhandled errors to Break on all errors. -- Jim Cone Portland, Oregon USA http://www.mediafire.com/PrimitiveSoftware (Formats & Styles: lists/removes unused styles & number formats - in the free folder) "Phil B" <phil.remove.brady@hotmail dot co dot united kingdom wrote in message ... I'm developing some vba macros under excel 2003 and am (naturally) getting errors. Compile time errors highlight the offending line, but seemingly not run time errors. All I'm getting is a helpful message eg 'Invalid procedure call or argument' but no clue as to which line of code is giving this. Isn't it possible to get the environment to highlight the offending source line? There must be a better way than a liberal sprinkling of print and msgbox diagnostics. regards Phil B |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2003 + hungapp errors | Excel Discussion (Misc queries) | |||
errors in Excel 2003 | Excel Programming | |||
errors in Excel 2003 | Excel Discussion (Misc queries) | |||
excel 2003: Module errors | Excel Programming | |||
Excel 2003 Updates, and Errors | Setting up and Configuration of Excel |