Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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
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
Excel 2003 + hungapp errors rick m Excel Discussion (Misc queries) 0 March 25th 08 09:27 AM
errors in Excel 2003 Kilbrennan Excel Programming 6 April 7th 06 01:57 PM
errors in Excel 2003 Kilbrennan Excel Discussion (Misc queries) 0 April 6th 06 11:32 AM
excel 2003: Module errors Kikulitz Excel Programming 1 May 11th 05 01:42 PM
Excel 2003 Updates, and Errors SchachMeister Setting up and Configuration of Excel 0 April 25th 05 05:33 PM


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