Link to home
Start Free TrialLog in
Avatar of myname17
myname17

asked on

vbNewLine Problem

vbNewLine is acting weird on my PC.  When I run this (or anything similar):

Private Sub Command1_Click()
   Text1.Text = "vbNewLine" & vbNewLine & "After new line"
End Sub

I get vbNewLine||After new line
Note:the || isn't exactly what apears, just as close as I can type it.

When I pasted that line into this form it acted like it was suposed to:
vbNewLine
After new line

I'm running XP Pro with visual studio enterprise.  I've tried reinstalling VB.  Any ideas?  Has anyone seen this before?

Thanks,
Mike
Avatar of Djinn_ro
Djinn_ro

Use vbCrLf
ASKER CERTIFIED SOLUTION
Avatar of Z_Beeblebrox
Z_Beeblebrox

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
also, make sure you enable the scrollable property (vertical scrollbars).
i.e.,

to do it programmatically:

text1.multiline=true
text1.scrollbars=1;
text1.text = "hi there" & vbCrLf & vbCrLf & "blahblahblah"

now it will work fine...!
The multiline property is readonly at run time... except through maybe some APIs (but I don't know of any).  You need to do it at design time