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
![Step2 51 Step2 51](https://i.how-what-advice.com/images/010/image-28324-1-j.webp)
Step 1. Open the Notepad app
- Press Win+R keys simultaneously.
- Type notepad in the Run dialog.
- Press Enter or click OK.
![Step3 54 Step3 54](https://i.how-what-advice.com/images/010/image-28324-2-j.webp)
Step 2. Copy and paste the following code into Notepad:
x=msgbox("Your Message Here ", Button+Icon, "Your Title Here")
![Step4 42 Step4 42](https://i.how-what-advice.com/images/010/image-28324-3-j.webp)
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
![Step5 34 Step5 34](https://i.how-what-advice.com/images/010/image-28324-4-j.webp)
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)
![Step6 29 Step6 29](https://i.how-what-advice.com/images/010/image-28324-5-j.webp)
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.
![Step7 14 Step7 14](https://i.how-what-advice.com/images/010/image-28324-6-j.webp)
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.
![Step8 13 Step8 13](https://i.how-what-advice.com/images/010/image-28324-7-j.webp)
Step 7. Open the Save As window
Press Ctrl+S on the keyboard.
![Step9 8 Step9 8](https://i.how-what-advice.com/images/010/image-28324-8-j.webp)
Step 8. Expand the combo box next to Save as type and select All Files
![Step10 7 Step10 7](https://i.how-what-advice.com/images/010/image-28324-9-j.webp)
Step 9. Type the file name followed by a period and vbs
![Step11 3 Step11 3](https://i.how-what-advice.com/images/010/image-28324-10-j.webp)
Step 10. Select the location to save the file
![Step12 2 Step12 2](https://i.how-what-advice.com/images/010/image-28324-11-j.webp)
Step 11. Save the file
Click Save.
Step 12. Show error message
Double-click the file that has been created.
![Step13 2 Step13 2](https://i.how-what-advice.com/images/010/image-28324-12-j.webp)
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.
![Step2 51 Step2 51](https://i.how-what-advice.com/images/010/image-28324-13-j.webp)
Step 1. Open the Notepad app
- Press Win+R keys simultaneously.
- Type notepad in the Run dialog.
- Press Enter or click OK.
![Step3 54 Step3 54](https://i.how-what-advice.com/images/010/image-28324-14-j.webp)
Step 2. Copy and paste the following code into Notepad:
x=msgbox("Your Message Here ", Button+Icon, "Your Title Here")
![Step4 42 Step4 42](https://i.how-what-advice.com/images/010/image-28324-15-j.webp)
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
![Step5 34 Step5 34](https://i.how-what-advice.com/images/010/image-28324-16-j.webp)
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)
![Step6 29 Step6 29](https://i.how-what-advice.com/images/010/image-28324-17-j.webp)
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.
![Step7 14 Step7 14](https://i.how-what-advice.com/images/010/image-28324-18-j.webp)
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.
![Switch line position notepad Switch line position notepad](https://i.how-what-advice.com/images/010/image-28324-19-j.webp)
Step 7. Move to the next line
![Make another message Make another message](https://i.how-what-advice.com/images/010/image-28324-20-j.webp)
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
![Step8 13 Step8 13](https://i.how-what-advice.com/images/010/image-28324-21-j.webp)
Step 9. Open the Save As window
Press Ctrl+S on the keyboard.
![Step9 8 Step9 8](https://i.how-what-advice.com/images/010/image-28324-22-j.webp)
Step 10. Expand the combo box next to Save as type and select All Files
![Step10 7 Step10 7](https://i.how-what-advice.com/images/010/image-28324-23-j.webp)
Step 11. Type the file name followed by a period and vbs
![Step11 3 Step11 3](https://i.how-what-advice.com/images/010/image-28324-24-j.webp)
Step 12. Select the location to save the file
![Step12 2 Step12 2](https://i.how-what-advice.com/images/010/image-28324-25-j.webp)
Step 13. Save the file
Click Save.
Step 14. Show error message
Double-click the file that has been created.