Carriage Return in msgbox/inputbox

jcvoth

Board Regular
Joined
Feb 23, 2004
Messages
198
Dear all,

Parry, thanks for your help on my earlier query. The code is working flawlessly. I experimented for a bit with userforms, but I think spoonfeeding the user with one question at a time is the best course.

I did come across one minor problem. I have several msgboxes and/or inputboxes that come out in a poor format. example:

InputBox("What Type of Transaction do you wish to enter? (OE: Addition or Withdrawl from the Business, PMT: A Payment to the principle lender; MBNA, or CLS: A Journal entry to close the Accounting Period.)")

The inputbox is formatted as follows:

What Type of Transaction do you wish to enter? (OE: Addition or Withdrawl from the Business, PMT: A Payment to the principal lender; MBNA, or CLS: A Journal entry to close the Accounting Period.

I would like to find a way to format it as follows:

What type of Transaction do you wish to enter?

* OE: Addition or withdrawl from the Business
* PMT: A Payment to the principal lender
* CLS: A Journal Entry to close the Accounting Period.

Is there a way to enter a carriage return in msgbox/inputboxes?
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
63,976
Office Version
  1. 365
Platform
  1. Windows
vbCrLF will create a carriage return in Message Boxes and Input Boxes, i.e.

MsgBox "*Message Line 1" & vbCrLf & "*Message Line 2"
 

Iridium

Well-known Member
Joined
Jul 15, 2002
Messages
2,831
Check out 'Miscellaneous Constants' in the VBE help...
 

jcvoth

Board Regular
Joined
Feb 23, 2004
Messages
198
This is great. I printed myself a copy of the miscellaneous constants for future reference.

You guys are awesome.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,168,087
Messages
5,857,285
Members
431,868
Latest member
servox

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top