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
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
Use vbCrLf
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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...!
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