HELP! Counting carriage returns in multiline text box 
Author Message
 HELP! Counting carriage returns in multiline text box

Help!
I need help with counting the carriage returns in a multiline text box,
any help would be greatly appreciated.




Wed, 28 Jul 1999 03:00:00 GMT  
 HELP! Counting carriage returns in multiline text box

Quote:

> Help!
> I need help with counting the carriage returns in a multiline text box,
> any help would be greatly appreciated.



Try something like this:

    Dim lines As Long
    Dim dummy As String

    Open "c:\someFile" For Input As #1 ' Open file.
    Do While Not EOF(1)                ' Loop until end of file.
        lines = lines + 1              ' Increment line counter.
        Line Input #1, dummy           ' Read line into variable.
    Loop
    Close #1                           ' Close file.
    MsgBox Str(lines)                  ' Display number of lines.

Rainer Link



Fri, 30 Jul 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. HELP Counting carriage returns in multiline text box

2. Carriage Returns in Multiline Text Box

3. Line length & count for multiline Text Box

4. Carriage Returns In Text Boxes

5. Carriage Return in text box

6. carriage return in a text box?

7. Carriage return in text box?

8. How to hide linefeed, and carriage return characters in text boxes

9. Inserting a carriage return in a text box

10. Putting a Carriage Return in to a rich text box

11. Carriage return & Text boxes in VB 4.0

12. Carriage Returns in a Text Box

 

 
Powered by phpBB® Forum Software