Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

vbNewLine Problem

Posted on 2003-10-21
5
999 Views
Last Modified: 2012-08-14
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
0
Comment
Question by:myname17
5 Comments
 
LVL 2

Expert Comment

by:Djinn_ro
ID: 9593926
Use vbCrLf
0
 
LVL 7

Accepted Solution

by:
Z_Beeblebrox earned 125 total points
ID: 9594160
You need to make the text box a multiline text box, it is one of the properties.

Zaphod.
0
 
LVL 10

Expert Comment

by:cool12399
ID: 9594581
also, make sure you enable the scrollable property (vertical scrollbars).
0
 
LVL 10

Expert Comment

by:cool12399
ID: 9594692
i.e.,

to do it programmatically:

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

now it will work fine...!
0
 
LVL 4

Expert Comment

by:eric0213
ID: 9594746
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
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question