Results 1 to 11 of 11

Thread: PLEASE HELP **Possible Easy Answer!**

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    5

    Wink

    I run a DOS batch file store the info it shows to a text file and then load it in a VBtextbox but,

    it shows them silly BLACK SQUARES instead of goin onto a new line,

    Please help HOW do I change the squares to new lines in the textbox!

  2. #2
    Fanatic Member ExcalibursZone's Avatar
    Join Date
    Feb 2000
    Location
    Western NY State
    Posts
    908
    Is your textbox set up for multiline?
    -Excalibur

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    5

    yes

    yes it is there must b a simple way, notepad cant do it but wordpad can!

  4. #4
    Fanatic Member
    Join Date
    Sep 2000
    Posts
    770
    You need to make sure you have your text box MultiLine Property set to True.

  5. #5

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    5

    s

    it is

  6. #6
    Fanatic Member
    Join Date
    Sep 2000
    Posts
    770
    Maby your file's line returns are messed up

    have you tryed making a new text file and loading that?

  7. #7
    Fanatic Member ExcalibursZone's Avatar
    Join Date
    Feb 2000
    Location
    Western NY State
    Posts
    908
    Then, try this:
    You'll need to find out the ASCII value of the black box.
    Do a replace statement on Text1.Text. In all instances, replace vbLF with chr(XXX) if the black box is not a Line Feed character. XXX = the ASCII code of the character.

    Code:
    Replace(Text1.Text,vbLF, vbCRLF)
    If you don't have the replace function, try this:

    Code:
    Dim X As Long
    Dim sChar As String
    Dim sNewText As String
    
    sNewText = ""
    For X = 1 to Len(Text1.Text)
        sChar = mid(Text1.Text, X, 1)
        If sChar = vbLF then
            sNewText = sNewText & vbCRLF
            Else
            sNewText = sNewText & sChar
        End If
    Next X
    Text1.Text = sNewText
    Hope this helps you out.
    -Excalibur

  8. #8

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    5
    no luck mate

  9. #9
    Guest
    How about
    Code:
    Replace(Text1.Text,vbCR, vbCRLF)

  10. #10
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    I dont have the code but you can search for that character then replace it with a "vbNewLine"
    NXSupport - Your one-stop source for computer help

  11. #11
    Guest
    How about:

    Code:
    Replace(Text1.Text,chr(13), vbCRLF)
    Replace(Text1.Text,chr(10), vbCRLF)
    Replace(Text1.Text,chr(16), vbCRLF)
    Replace(Text1.Text,chr(17), vbCRLF)
    Replace(Text1.Text,chr(18), vbCRLF)
    Replace(Text1.Text,chr(19), vbCRLF)
    Replace(Text1.Text,chr(20), vbCRLF)
    Note that all of these may be used.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width