Google Answers Logo
View Question
 
Q: Visual Basic Mailing label ( Answered,   0 Comments )
Question  
Subject: Visual Basic Mailing label
Category: Computers > Programming
Asked by: mrfony-ga
List Price: $3.00
Posted: 20 Jan 2003 14:25 PST
Expires: 19 Feb 2003 14:25 PST
Question ID: 146129
In this project I'm creating a label maker so there is 3 boxes one for
a first and last name and one for the address and one for the city
state and zipcode  my problem is when I try to have all 3 text boxes
go together into one label right now its all on one line so I need the
correct code to separate the 3 fields  into 3 separate lines of text
like a normal label
 
i.e 
Justin musser
2412 lalkwood 
midland mi 48640
 
this is the current code I have 
Private sub cmddisply_ Click ()
lblmail.caption=txtname.text _
& txtaddress.text _
& txtzip.text
Answer  
Subject: Re: Visual Basic Mailing label
Answered By: hammer-ga on 20 Jan 2003 14:43 PST
 
To force a line break, concatenate in the Visual Basic constant for a
Carriage Return/Line Feed pair: vbCrLf

Private sub cmddisply_ Click () 
lblmail.caption=txtname.text _ 
& vbCrLf & txtaddress.text _ 
& vbCrLf & txtzip.text

Additional Resources:
The Microsoft Knowledge Base includes an article listing these
constants. While the article says it's for Mac products, the constants
listed will work.
http://support.microsoft.com/default.aspx?scid=kb;en-us;274462

The MSDN Library that came with Visual Basic also includes these
constants. If you type vbCrLf in a code module, place your cursor in
it, and press F1, you will get the Help page with this family of
constants.

- Hammer
Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy