Re: Can lines collection be used to assist me in automatically numbering lines?



MLH wrote:

> What <snip> possible CAUSE needs to be identified when someone
> asks about line numbering inside VBA procedures?

Well I like to know background and projected use with respect to
questions. The question actually was "Can lines collection be used to
assist me in automatically numbering lines?" you may have felt that
anyone who answered should know the answer, but many of us will need
more information before we venture a try.

Each of us who answers questions invests his/her time and skills in
doing so. An assessment of how helpful dealing with the question might
be in general, as opposed to the singular needs of the original poster,
helps me decide how much I want to invest.

I've written several procedures that modify modules in code. They use
the Lines Property (String) of the Modules Object. Would modifying one
of these to add line numbers be worthwhile? I'm not sure. If someone
showed me a good rationale for doing so, I probably would. As I said in
another message in this thread, I assume it's a not very demanding
task.

I had hoped that I was encouraging you to look carefully at the Object
Browser as it is a very powerful help to code writing, and I was hoping
that encouraging you to note differences such as whether a function is
typed or returns a variant would help you with some of the confusion
which, IMO, you sometimes show. For instance if you had looked up lines
in the Object Browser, I think you could have phrased your question
more clearly.

When someone answers a question in CDMA one is answering not the
original poster but the world. One cannot expect to make statements
with which others disagree and have them not respond with their own
opinions. This would be unfair to others who read the answers. They can
make up their own minds but they deserve to know that there are other
views.

Take for instance, NZ. Many think that NZ in SQL returns a string. I,
on the other hand am quite sure that NZ always returns a variant, and
that SQL treats a variant whose type it cannot recognize as a string.
Who is right? I don't know but I do know that readers should realize
that there is more than one opinion.

I would suggest that your question phrased as
"How can I automatically number lines in my Code"
might have elicited for you more helpful answers.

While there is a collection of lines it's not entirely clear to me at
this time that there is a Lines Collection. Why confuse the issue with
something which may or may not be accurate and is extraneous?

.



Relevant Pages

  • Re: copies
    ... The page numbers in the Pages string are the "adjusted" page numbers ... that take into account any restarting of numbering in various ... If you have section breaks and numbering restarts, ... How can I alter the code to accomodate my needs? ...
    (microsoft.public.word.vba.general)
  • Re: Printing problem
    ... The autotext page are inserted at the end of the story. ... Page numbering is started on page 4. ... Dim i As String ...
    (microsoft.public.word.vba.general)
  • =RowNum([Form]) - equivalent in a report?
    ... Public Function RowNumAs Variant ... On Error GoTo Err_RowNum ... 'Purpose: Numbering the rows on a form. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Sort legal numbering
    ... this function in:Function ChaptSort(cell As String) As ... where B27 contains the legal numbering. ... Add the macro (there's a link to *Getting Started with Macros and User ...
    (microsoft.public.excel.misc)
  • Re: print a segmant of sequace..
    ... Perl starts numbering a string at zero, not one, so you need to start ...
    (perl.beginners)