BOOK: VBScript Programmer's Reference, 1st, 2nd, and 3rd editions
This is the forum to discuss the Wrox book VBScript Programmer's Reference, 3rd Edition by Adrian Kingsley-Hughes, Kathie Kingsley-Hughes, Daniel Read; ISBN: 9780470168080
You are currently viewing the BOOK: VBScript Programmer's Reference, 1st, 2nd, and 3rd editions section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
The below script will not display the err in a windows dialog.
It is displayed in the command box and is only seen if I execute it from the command prompt.
If I click on the file name in windows explorer the command prompt box appears and disappears so quick that the result is lost.
Option Explicit
Dim x, y
x = InputBox("Please enter a number to divide into 100.")
If x <> 0 Then
y = 100 / x
MsgBox "100 divided by " & x & " is " & y & "."
Else
Err.Raise vbObjectError + 15000, _
"ERR_MSG_UGLY.VBS", _
"Hey, stupid, you can't enter a zero. It will " & _
"cause a divide by zero error."
End If
Why doesn't the windows dialog box appear as shown in the book?