Solved

Multiple Lines in a MsgBox

Posted on 1998-07-05
6
265 Views
Last Modified: 2010-05-03
How do I create two, or more, independent lines in a MsgBox (i.e., not word-wrapped)?  For example, I am using this code to display educational background

Private Sub cmdEduc_Click(Index As Integer)
    MsgBox "A.A.S. Computer Science Technology - Community College of the Air Force", vbOKOnly, "Education"
End Sub

I need to display a second line for my Bachelor degree.
0
Comment
Question by:regent
6 Comments
 

Author Comment

by:regent
ID: 1464993
Edited text of question
0
 
LVL 3

Accepted Solution

by:
AndreasSchindler earned 50 total points
ID: 1464994
MsgBox "A.A.S. Computer Science Technology - Community " + Chr(13) + " College of the Air Force", vbOKOnly, "Education"
0
 

Author Comment

by:regent
ID: 1464995
Thank you very much.  I didn't understand what the Help Page was saying about the Chr(13) thing.  

tjr
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 

Author Comment

by:regent
ID: 1464996
Thank you very much.  I didn't understand what the Help Page was saying about the Chr(13) thing.  

tjr
0
 

Expert Comment

by:hmt
ID: 1464997
the chr(13) is the same as a carriege return ytou can use chr(13) or a vb constant VBCRLF

0
 

Expert Comment

by:luvbox
ID: 1464998
Dim nl$,msg$

nl = chr(13) & chr(10)

msg = "Put Your Massege!!! Here " & nl
msg = msg & "Put Some stuff .Here" & nl

MsgBox msg

'I hope that help
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

770 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