line numbers in VB 
Author Message
 line numbers in VB

Quote:

> Line numbers for the code you are in don't seem to be displayed
> ANYWHERE?? Can that be? Is there nowhere where you can toggle line
> number on and off so you can KNOW what line you are on in a particular
> module?

AFAIK, no.

Quote:
> ALSO, there is an ERL built-in function that is SUPPOSED to return the
> LINENUMBER that gave a particular error (to be used with ON ERROR)
> YET, whenever I've tried to display it it ALWAYS says line "0".
> What good is this ERL command if it never gives the line number
> that actually caused an error?

An example will demonstrate better than an explanation:

   On Error Goto PROC_ERR

100:   Set MyDatabase = OpenDatabase("xyz.mdb")

101:   Set MyRecordset = MyDatabase.OpenRecordset("abc")

   Exit Sub

PROC_ERR:

   if Erl = 100 Then
      MsgBox "Couldn't open database (" & _
              Cstr(Err.Number) & ") " & Err.Description
   elseif Erl = 101 Then
      MsgBox "Couldn't open recordset (" & _
              Cstr(Err.Number) & ") " & Err.Description
   else
      MsgBox "Unexpected error (" & _
              Cstr(Err.Number) & ") " & Err.Description
   end if

   Exit Sub

End Sub

Hope that helped

P.S. You wouldn't happen to know of any Montreal VB Groups, in either
official language (or for that matter, in Italian or Norwegian) ?

N Varacalli
--
The views expressed herein do not represent the views of my employer.

The Address in the header is mangled, delete appropriately.

To reach me via e-mail, try (replacing stars with dots)
NICHOLAS_VARACALLI at non-hp-Canada-om1*om*hp*com



Sun, 13 Feb 2000 03:00:00 GMT  
 line numbers in VB

Quote:


> > Line numbers for the code you are in don't seem to be displayed
> > ANYWHERE?? Can that be? Is there nowhere where you can toggle line
> > number on and off so you can KNOW what line you are on in a particular
> > module?

There is an interesting discussion of using line numbers on pages 11-13
of the book: Advanced Visual Basic 5 (Microsoft Press).

R Dee



Thu, 17 Feb 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Word '97 Line Number in VB 6.0

2. Line numbers and VB.NET

3. LINE NUMBERING IN VB

4. Word '97 Line Number from VB 6.0

5. Need tool to add line numbers to vb source

6. Line Numbers in VB IDE

7. Line Numbers in VB

8. line numbers in VB

9. line numbers in VB

10. PBM: Line numbers used by Goto method do not reflect displayed line numbers in document

11. Line numbers into multi-line text box

12. Numbering VB code lines

 

 
Powered by phpBB® Forum Software