A 5 minute guide.
ninjas.digital GUIDE!
How to make your very own custom error message.
|
1. right-click desktop W T (new )
2. ENTER ENTER (open )
3. Paste the code. (see below)
4. Alt F A (save-as )
5. Type: filename.vbs ENTER
The Code
ninjas=msgbox("My custom error message.", 0+16 , "My error title.")
Options
After entering your own error title and error message you can change the error icon and button choices by editing 0+16:
FIRST VALUE | SECOND VALUE | ||
---|---|---|---|
0 = | OK | 16 = | |
1 = | OK Cancel | 32 = | |
2 = | Abort Retry Ignore | 48 = | |
3 = | Yes No Cancel | 64 = | |
4 = | Yes No | x = | none |
5 = | Retry Cancel |
Adding Line Breaks
To start a new line in your error message use & vbCrLf &
for a line break then quotes containing the text for the next line. Use ""
for a blank line.
ninjas=msgbox("I'm sorry, Dave." & vbCrLf & "I'm afraid I can't do that." & vbCrLf & "" & vbCrLf & "I think you know what" & vbCrLf & "the problem is just as" & vbCrLf & "well as I do.", 5+48 , "ninjas.digital - HAL 9000")
Stacked Error Windows
To let Windows stack multiple error windows simply open the same file twice without clicking a button or closing a window.
Leave a Reply