Current line number 
Author Message
 Current line number

        HI!

    Is there a way to determine current line number in CodeModule (using VB
6.0 Extensibility library)? I'm working on Add-In which should perform some
code addition in currently edited Sub/Function/Property. By now I can
determine name, scope and type of the Sub (using ProcOfLine function and
properties of Members collection) but I have to provide a line number that
is contained inside interesting Sub/Function/Property. I know that it't
possible to obtain line and column number because is displayed in VB IDE in
right upper corner but I don't know how to do it.

Thanks in advance




Mon, 02 Sep 2002 03:00:00 GMT  
 Current line number
I've already found solution. There's sub GetSelection(StartLine As Long,
StartColumn As Long, EndLine As Long, EndColumn As Long) which is desiged to
return coordinates of highlighted text in CodePane object. If no text is
selected then it returns position of text cursor. That's what I needed. I
hope it will be helpful not only to me.




Mon, 02 Sep 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Current Line Number in an Access Module

2. Finding current line number in Access 97 module

3. Current Line Number

4. Determine current line number in textarea

5. Current line number in a RichTextBox.

6. Current line number in a RichTextBox.

7. Current line number in a RichTextBox.

8. How to determine the current line number in a module...?

9. how to retrieve the current line number in Vbscript?

10. How can I derive current line number from GetScrollPos?

11. how to retrieve the current line number in Vbscript?

12. Number of current 'line' (para)

 

 
Powered by phpBB® Forum Software