Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am writing a VBA a code in Excel (VB6 format). I need to
know is there any methods that I can store the "code line number" in a variable. This will help me a lot for error trapping. I would appreciate your help. Regards Masoud |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you number your lines, you can use erl
Sub Tester1() On Error goto ErrHandler: 001 for i = 1 to 10 002 j = i ^ 2 003 next i 004 err.Raise 5001 005 for i = 1 to 10 006 k = i ^ 2 007 next i 008 exit sub ErrHandler: msgbox err.Number & " at line number " & erl End Sub for example -- Regards, Tom Ogilvy "Masoud" wrote in message ... I am writing a VBA a code in Excel (VB6 format). I need to know is there any methods that I can store the "code line number" in a variable. This will help me a lot for error trapping. I would appreciate your help. Regards Masoud |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Masoud,
The MZ Tools add-in (http://www.mztools.com/) can make this easier, along with many other taks. NickHK "Masoud" wrote in message ... I am writing a VBA a code in Excel (VB6 format). I need to know is there any methods that I can store the "code line number" in a variable. This will help me a lot for error trapping. I would appreciate your help. Regards Masoud |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro code to put series name next to individual line in line grap | Charts and Charting in Excel | |||
Convert a Number Code to a Text Code | Excel Discussion (Misc queries) | |||
code line number | Excel Programming | |||
Enabling Line/Column number in code | Excel Programming | |||
My code replace the data by the line number | Excel Programming |