RE: [BATCH WORLD] Interactive Batch options
- Some good info there, thanks Josh, I definitely need to get more up to
speed on this VB stuff. It's fairly easy to use and plenty handy.
Ken Mazie MCSE/CNE/CCNA
Kaiser Permanente Wintel Engineering
From: Josh Fitzgerald [mailto:aphoria@...]
Sent: Tuesday, June 03, 2003 6:21 AM
Subject: Re: [BATCH WORLD] Interactive Batch options
1) You can replace Chr(10) & Chr(13) with vbCrLf which is an internal
constant to VBScript. You could also use the line continuation
character to break the line up across multiple lines, like this:
Msgbox "Press Enter to go to next." & Chr(13) & Chr(10) & "Box Num: " &
2) You need to capture the return value of the MsgBox function. In my
example below, I capture the return value in a variable called result.
Then, I check the value of result. If the user clicked Abort or Cancel,
I break out of the For loop. Notice the parentheses around the MsgBox
params, they are necessary when calling MsgBox as a function. Here is
my example code:
For counter = 0 To 5
result = Msgbox("Press a button." & vbCrLf & "Box Num: " & counter,
counter, "My Title"
If (result = vbAbort) or (result = vbCancel) Then