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?
 

Some videos you may like

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,935
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,670
Messages
5,597,483
Members
414,146
Latest member
marginmakerb

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