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!

MsgboxVBAExample

This is an plain text dialog form.

You can also do rich text with this:

MsgboxVBAExample_RichText

Here is the code:

The Best VBA Tutorials Are At: VBAHowTo.com

asdfasdfasfasfdasfasfassdfgsdgsddfghdfghdhasdfaszxvczcxrrrrrrrrrrrrfasfasdfsf

” ‘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:

MsgboxVBAExample_b4

…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