Re: How to get line number in VB in runtime....

Mark Burns <[email protected]> Thu, 24 Apr 2003 08:58:56 -0400
Newsgroups gmane.comp.windows.devel.vbcom
Message-ID <[email protected]>
Salai,

You don't get line numbers automatically in VB6 - old files or new.
Line numbers or line labels MUST be inserted into the source code
manually.

Now, that said, you could write some code to put line numbers into your
old source code files...
Open them as ASCII text files, change the buffer - inserting a line
number and a colon(:), (unless the line has a colon not within quotes in
it already), and write it back out again to a new source text file.
Repeat, incrementing the line number each time (I'd recommend increments
of 10, at least, but 100 would be better), until the end of the source
file is reached.

Regards,
Mark

> -----Original Message-----
> From: Technical discussion of VBCOM [mailto:[email protected]]
On
> Behalf Of Salai Sivadhanam
> Sent: Thursday, April 24, 2003 2:33 AM
> To: [email protected]
> Subject: Re: [VBCOM] How to get line number in VB in runtime....
>
> Thanx Randell...
>
> But, will U pls tell me how to include line numbers automatically in
the
> old files, developed in VB 6.0....?
>
> Salai
>
>
> -----Original Message-----
> From: Technical discussion of VBCOM
[mailto:[email protected]]On
> Behalf Of Randell, Brian
> Sent: Thursday, April 24, 2003 10:27 AM
> To: [email protected]
> Subject: Re: [VBCOM] How to get line number in VB in runtime....
>
> Use Erl. You will need to add the line numbers to your source code for
> this to work.
>
> Cheers,
>
> Brian Randell
> DevelopMentor
>
>         -----Original Message-----
>         From: Salai Sivadhanam [mailto:[email protected]]
>         Sent: Wed 4/23/2003 9:42 PM
>         To: [email protected]
>         Cc:
>         Subject: [VBCOM] How to get line number in VB in runtime....
>
>
>
>         Hi Friends....
>
>         I am having one problem.... I want to log the line number
where
> error
>         occurs, in my VB code.... Will anyone suggest me how can I
find
> the line
>         number in runtime automatically....?  Is there any command, or
> method to get
>         the line number in runtime....?
>
>         Help Pls....
>
>         Salai
>
>         You can read messages from the VBCOM archive, unsubscribe from
> VBCOM, or
>         subscribe to other DevelopMentor lists at
> http://discuss.develop.com.
>
>
> You can read messages from the VBCOM archive, unsubscribe from VBCOM,
or
> subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the VBCOM archive, unsubscribe from VBCOM, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.