Do you want to customize Windows error messages? Whether you're an app developer or just looking to make fun of a co-worker, knowing how to create custom error messages is an important skill. To learn how to create a custom error message in Windows, follow this guide.
Step
Method 1 of 2: Single Error Dialog
Step 1. Open the Notepad app
- Press Win+R keys simultaneously.
- Type notepad in the Run dialog.
- Press Enter or click OK.
Step 2. Copy and paste the following code into Notepad:
x=msgbox("Your Message Here ", Button+Icon, "Your Title Here")
Step 3. Customize your error message button
Replace the Keys in the code you pasted into Notepad with one of the following numbers:
- 0 - OK
- 1 - OK and Cancel
- 2 - Abort, Retry and Ignore
- 3 - Yes, No and Cancel
- 4 - Yes and No
- 5 - Retry and Cancel
Step 4. Customize your error message icon
Replace the Icon in the code you pasted into Notepad with one of the following numbers:
- 0 – No Icon
- 16 – Critical Icon (aka "X" icon)
- 32 – Ask icon (aka "?" icon)
- 48 – Warning Icon (aka "!" icon)
- 64 – Information icon (aka "i" icon)
Step 5. Customize the title of your error message
Replace Your Title Here in the code you pasted into Notepad with the error message title you want.
Step 6. Customize the body of your error message
Replace Your Message Here in the code you pasted into Notepad with the body of the error message you want.
Step 7. Open the Save As window
Press Ctrl+S on the keyboard.
Step 8. Expand the combo box next to Save as type and select All Files
Step 9. Type the file name followed by a period and vbs
Step 10. Select the location to save the file
Step 11. Save the file
Click Save.
Step 12. Show error message
Double-click the file that has been created.
Method 2 of 2: Sequential Error Dialog
Generate sequential error messages. Messages will be displayed one by one, and closing one message will display the next message.
Step 1. Open the Notepad app
- Press Win+R keys simultaneously.
- Type notepad in the Run dialog.
- Press Enter or click OK.
Step 2. Copy and paste the following code into Notepad:
x=msgbox("Your Message Here ", Button+Icon, "Your Title Here")
Step 3. Customize your error message button
Replace the Keys in the code you pasted into Notepad with one of the following numbers:
- 0 - OK
- 1 - OK and Cancel
- 2 - Abort, Retry and Ignore
- 3 - Yes, No and Cancel
- 4 - Yes and No
- 5 - Retry and Cancel
Step 4. Customize your error message icon
Replace the Icon in the code you pasted into Notepad with one of the following numbers:
- 0 – No Icon
- 16 – Critical Icon (aka "X" icon)
- 32 – Ask icon (aka "?" icon)
- 48 – Warning Icon (aka "!" icon)
- 64 – Information icon (aka "i" icon)
Step 5. Customize the title of your error message
Replace Your Title Here in the code you pasted into Notepad with the error message title you want.
Step 6. Customize the body of your error message
Replace Your Message Here in the code you pasted into Notepad with the body of the error message you want.
Step 7. Move to the next line
Step 8. Create another error message (if desired)
Repeat this step, starting from Step 3.
This error message will appear after the previous error message is closed
Step 9. Open the Save As window
Press Ctrl+S on the keyboard.
Step 10. Expand the combo box next to Save as type and select All Files
Step 11. Type the file name followed by a period and vbs
Step 12. Select the location to save the file
Step 13. Save the file
Click Save.
Step 14. Show error message
Double-click the file that has been created.