-
This will sound pathetic to most of you, but since I'm just learning VB (4) I don't know much about the "extras" within VB.
My question is how to skip lines when entering text into a textbox using txtText1.text = "text here"... so, how do I put in text, then jump down a couple of lines.
Thanks.
-
first I have VB6 so I don't know what the VB4 limits may be.
Set the text box multiline property to true.
Private Sub Form_Load()
textbox1.text= "Hello" & vbcrlf & "World"
End Sub
will put:
in the text box.
------------------
I am so skeptacle, I can hardly believe it!
-
I think maybe there's a hard carraige return character. If you put that in, it should simulate pressing <ENTER>, or at least that's what I think.
Not sure how you get it now though. Maybe the Asc() function? Darned if I can remember. I think it has a ASCII code, so you should be able to use the function that converts an ASCII code into a character. Maybe Char() or something. If you look in the help index for Asc(), if that's not the right function, I'm pretty sure the 'see also' link will take you to the right one.
Then again, I could be completely wrong, and there isn't a hard carraige return character :)
Please tell me if I'm mistaken. I hope I'm not.
-
Erm... oh yeah. That too :D
-
It works beautifully, thanks very much Badgers.
-
Thanks for your reply Harry, just I got badgers' first and it is simpler and does exactly what I need it to do.
-
You're more than welcome, really. I think his idea is a little easier, don't you? Hehe :)
-
Another way would be to send the ascii code for a carriage return..
Chr(10)