Here Is A Customized Msgbox VBA Example

Here is an example of a customized VBA Msgbox.

We giving some richtext and customizable flair to the rather ordinary message box.

The following code provided with the code after the screenshot, is going to provide you with the
ability to really make the ordinary message box shine!


This is an plain text dialog form.

You can also do rich text with this:


Here is the code:

The Best VBA Tutorials Are At:


” ‘here you can use HTML tags to format your text box. intUserAnswer = Dialog.RichBox(strText, vbYesNo + vbInformation, “Customized Message Box”) Select Case intUserAnswer Case vbYes Dialog.Box “Yes, I agree” Case vbNo Dialog.Box “No they’re not” End Select End Sub

Here is what the ordinary form looks like:


…and here is the code behind the form for both message boxes:

Add a module called “Dialog”

and put this code into it:

Finally Add A Module called “API_GetTextMetrics”

and add this code:

Now you should be good to go.

Let me know if you have any questions.

Free! Subscribe To Our YouTube Channel!

facebooktwittergoogle_plusredditpinterestlinkedinmailby feather
Tags: ,


Call Erik Now