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

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
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.
 
Upvote 0
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:
Upvote 0
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.
 
Upvote 0
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:
Upvote 0
Code:
msgbox "some text:" & vbcrlf & variablename
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,286
Members
452,902
Latest member
Knuddeluff

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
Back
Top