Ernest,
Thank you.  I foolishly was using the Input box instead of the msgBox....
I am more shaemfaced than you.
Thanks again for pointing this out.

Best regards,
Scott

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Adams, Ernest
Sent: Tuesday, June 01, 2004 3:47 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [Talk] Input Box - Cancel


Oops!  Only the data gremlins know why the paste didn't work correctly!  The
correct code is
    valResult = MsgBox("Ready to go?", vbOKCancel, "All Information has been
gathered")
    
    If vbOK = valResult Then
        MsgBox ("OK")
    ElseIf vbCancel = valResult Then
        MsgBox ("Cancelled")
    Else
        MsgBox ("Unexpected result")
    End If

Apologies all around!

Ernest the shamefaced
-----Original Message-----
From: White, Scott A [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 01, 2004 2:53 PM
To: [EMAIL PROTECTED]
Subject: [Talk] Input Box - Cancel


Hi,
Does anyone know the "secret" to activating the Cancel button on an input
box here in BWS?

This is what I was attempting.... notice that I said attempting here.

RUReady = InputBox("Are you ready to Proceed with batch creation process?",
"All Information has been gathered", "Yes I am ", 2000, 2000)

'*** This block is to allow the user to cancel running of the script***
If Click = vbCancel Then
Wait 1
Shutdown = True
Wait 1
Else
If Click = vbOK Then
Wait 1
End If
'*** end of the cancel program block ***

Thank you,
Scott


****************************************************************************
***********
CONFIDENTIALITY NOTICE: This e-mail communication and any 
attachmentsmay contain confidential and privileged information for the 
use of the designated recipients named above.  If you are not the intended
recipient, you are hereby notified that you have received this communication
in error and that any review, disclosure, dissemination, distribution or 
copying of it or its contents is prohibited.
If you have received this communication in error, please notify Saratoga 
Hospital immediately by e-mail at [EMAIL PROTECTED] and destroy
all copies of this communication and any attachments.

Reply via email to