Bold Font inside MsgBox

Willmonbo

Board Regular
Joined
May 16, 2010
Messages
141
I am using a message box that pulls in a variable, I would like the variable to be displayed in Bold, can anyone help.

Thanks.
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
37,550
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
You can't do that with a message box. You'll need to create a userform and use a separate control for the bold part from the rest of the text.
 

Willmonbo

Board Regular
Joined
May 16, 2010
Messages
141
I am not sure how I would use a user form, the msg box that I have is triggered when i call a macro that deletes certain data in my data set, and this msg box helps me prevent accidental deletions, can I somehow use a user form in this scenario?

On a separate note, can you apply formatting to a text box in a user form, like i have a text box that I will use for numbers only, can i format it so it appears in a currency format?
 
Last edited:

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
37,550
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
Yes, you can use the Format function when you load the text into the textbox (or other control).
You can use a userform anywhere you can use a messagebox, though to be honest this sounds like more effort than it's worth to me - I would probably just put the variable on a separate line.
 

Willmonbo

Board Regular
Joined
May 16, 2010
Messages
141
I hate admitting it, but I don't know how to put the variable in a separate line, your help truly is appreciated.

while I am still at it, my question with regard to formatting a text box entry, goes to a user form text box that the user types data into the text box and and the user form code then distributes the data onto the sheet, but i want to data to appear in a currency format while still in the text box when the user enters the data
 
Last edited:

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
37,550
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
Code:
msgbox "some text:" & vbcrlf & variablename
 

Forum statistics

Threads
1,143,658
Messages
5,720,128
Members
422,267
Latest member
olund

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