How to Display a Checkmark in a VBA Message Box
Question details
The user wants to display a checkmark (success) icon in a VBA message box instead of the standard error 'X' icon.

- Product
- VBA / Spreadsheet
- Device & OS
- not provided
- Scenario
- Creating a success confirmation prompt with a checkmark after a macro completes its execution.
- Observed behavior
- The standard VBA MsgBox only supports four built-in icons (vbCritical, vbQuestion, vbExclamation, vbInformation) and cannot natively display a custom checkmark.
Before modifying your macro, save your workbook as a Macro-Enabled Workbook (.xlsm) to prevent losing your VBA code, and ensure the Developer tab is enabled in your ribbon menu.
Use a UserForm to Create a Custom Dialog
Since the standard MsgBox cannot display custom icons, creating a UserForm allows you to fully customize the dialog box with a checkmark image, specific text, and buttons.
The built-in VBA MsgBox function is strictly limited to four system icons. By designing a custom UserForm, you bypass these limitations entirely. This allows you to insert any image file, such as a green checkmark, to clearly indicate a successful operation to the user.
Press Alt + F11 on your keyboard to open the Visual Basic for Applications (VBA) Editor.
Click on 'Insert' in the top menu bar and select 'UserForm' to create a new blank dialog box.
Use the Toolbox floating window to add an 'Image' control to your UserForm. In the Properties window, find the 'Picture' property and load a checkmark image from your computer.
Add a 'Label' control for your success message text. Then, add a 'CommandButton' for the 'OK' action. Double-click the button and enter 'Unload Me' in its click event code to close the form when clicked.
Replace your standard MsgBox code in your main macro with 'UserForm1.Show' to display your custom checkmark dialog.

Use the Built-in vbInformation Icon
If you prefer not to build a custom UserForm, the closest native alternative to an error 'X' (vbCritical) is the information 'i' (vbInformation) icon.
Create Custom VBA Dialogs in WPS Spreadsheet
WPS Spreadsheet provides a comprehensive built-in VBA editor in its premium and professional editions, allowing you to easily design UserForms, write macros, and automate your workflow with high compatibility.
- 1. Enable the Developer Tab: Open WPS Spreadsheet, go to the Options menu, and enable the Developer tab to access macro tools.
- 2. Launch the VBA Editor: Click on the 'VBA Editor' button within the Developer tab to open the macro programming environment.
- 3. Design Your UserForm: Insert a new UserForm and easily drag-and-drop labels, buttons, and custom checkmark images using the toolbox.
- 4. Execute Your Code: Run your macro directly within WPS Spreadsheet to display your custom dialog instantly.

Frequently Asked Questions
Can I use a Unicode checkmark character inside a standard VBA MsgBox?
The standard VBA MsgBox does not natively support Unicode characters. If you try to paste a Unicode checkmark into the prompt text, it will usually display as a question mark (?) or an unrecognized square block.
What are the four default icons available in a VBA message box?
The standard VBA MsgBox only supports vbCritical (a red X), vbQuestion (a question mark), vbExclamation (a yellow warning triangle), and vbInformation (a blue 'i').
How do I remove the icon entirely from my MsgBox?
If you omit the icon parameter in your MsgBox code entirely (for example, MsgBox "Your message here"), no icon will be displayed. This is often preferable to showing an inappropriate default icon.




