Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 140
Default Record line number in macro where error occurs

When trapping errors, is it possible to record the line in the macro where
the error occurred so in the Error Trapping routine one can note this line to
assist in finding the error.

I copy error details to an Error Log so it would be handy to have the line
in the macro where the error trapping routine was triggered.
--
with kind regards

Spike
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Record line number in macro where error occurs

This post will be helpful.
http://www.fmsinc.com/free/NewTips/V...ineNumber.html

If this post is helpful click Yes
---------------
Jacob Skaria
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 140
Default Record line number in macro where error occurs

Thanks for tha. So we have to number the rows of the macro, which is a shame
as makes it look scrappy but then if that is it so be it.
--
with kind regards

Spike


"Jacob Skaria" wrote:

This post will be helpful.
http://www.fmsinc.com/free/NewTips/V...ineNumber.html

If this post is helpful click Yes
---------------
Jacob Skaria

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Record line number in macro where error occurs

Spike,

For development work, in the VBE: Tools / Options "General" tab, check "Break on all errors"

HTH,
Bernie
MS Excel MVP


"Spike" wrote in message
...
When trapping errors, is it possible to record the line in the macro where
the error occurred so in the Error Trapping routine one can note this line to
assist in finding the error.

I copy error details to an Error Log so it would be handy to have the line
in the macro where the error trapping routine was triggered.
--
with kind regards

Spike



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Record line number in macro where error occurs

Get MZTools... it's free and it's great! One of the many, many things it
does is allow you to add and remove line numbers at will.

http://www.mztools.com/v3/mztools3.aspx

--
Rick (MVP - Excel)


"Spike" wrote in message
...
When trapping errors, is it possible to record the line in the macro where
the error occurred so in the Error Trapping routine one can note this line
to
assist in finding the error.

I copy error details to an Error Log so it would be handy to have the line
in the macro where the error trapping routine was triggered.
--
with kind regards

Spike


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 2007 Error message when trying to record Macro Beth Excel Worksheet Functions 1 May 16th 10 08:32 AM
how to copy line above when XXX occurs and move on? Todd Excel Programming 2 September 14th 06 06:26 PM
Macro to enter record number in column A Sandeman[_19_] Excel Programming 4 April 3rd 06 11:35 AM
Macro to Count how many times a number occurs on a day SirMetro Excel Programming 8 February 2nd 05 05:36 PM
how to count/sum by function/macro to get the number of record to do copy/paste in macro tango Excel Programming 1 October 15th 04 01:16 PM


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