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!
Printable View
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!
Is your textbox set up for multiline? ;)
yes it is there must b a simple way, notepad cant do it but wordpad can!
You need to make sure you have your text box MultiLine Property set to True.
it is
Maby your file's line returns are messed up
have you tryed making a new text file and loading that?
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.
If you don't have the replace function, try this:Code:Replace(Text1.Text,vbLF, vbCRLF)
Hope this helps you out.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
no luck mate :(
How about
Code:Replace(Text1.Text,vbCR, vbCRLF)
I dont have the code but you can search for that character then replace it with a "vbNewLine"
How about:
Note that all of these may be used.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)