Question:
In VBA msgbox, how can we make the font size look bigger or bold?
maddy
2010-01-23 02:10:44 UTC
In VBA msgbox, how can we make the font size look bigger or bold?
Five answers:
optimo
2010-01-23 02:32:09 UTC
Should be in the properties toolbox. You'll be able to select your font weight and size. (e.g. 14pt bold). To change the font's properties dynamically you might want to do a search on Microsoft Technet.
anonymous
2016-11-06 09:28:33 UTC
Font Size Vba
garbo7441
2010-01-23 08:17:04 UTC
As previously stated, you cannot modify the text properties in a VBA messagebox. For me, the easiest way is to create a userform with a textbox and 'OK' button. You can modify the properties of the userform (including removing the blue header and exit 'X'), and the textbox and command button.



Then in your macro, instead of 'msgbox "yada yada",vbOkOnly,"Msg Title"', enter the line:



Userform1.Show



Code the 'OK' button on the userform:



Unload Userform1



You can also add code to display the userform for a set time period, then automatically close. Images can also be added to the userform if desired.
anonymous
2010-01-23 03:53:42 UTC
there is no way with just using



Dim SayIt As String

SayIt = MsgBox("I say it", vbInformation, "I say it")



Below is a link to a way to make it seem there is a custom message box

http://blog.nkadesign.com/2008/ms-access-enhanced-message-box-replacement/



It is a class built by someone and it calls the object "Box" instead of MsgBox
automicss
2010-01-23 03:33:41 UTC
As far as I know that's not possible, I suggest you create your own msgBox Form.

Then you have full control over these things.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...