Support Forums
[code help] VBscript InputBox Cancel If Statement - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18)
+---- Forum: Visual Basic and the .NET Framework (https://www.supportforums.net/forumdisplay.php?fid=19)
+---- Thread: [code help] VBscript InputBox Cancel If Statement (/showthread.php?tid=17886)



[code help] VBscript InputBox Cancel If Statement - Resistance - 04-10-2011

I posted this thread on HF, VBForums and now SF. And I highly doubt anybody can help me, but that would be miraculous.


Does anybody know how to use result of if the user canceling the InputBox, or Xing it out? Like this:

Code:
Dim objShell
  objShell = CreateObject("Wscript.Shell")
  Dim Wscript
  Wscript = CreateObject("Wscript.Shell")
If GetObject("blablabla").Something(InputBox("Hello World", "Enter a Response:", "<ENTER RESPONSE HERE>"), 0, 100) = InputBox.Result = Cancel Then
    End If

But clearly that code wouldn't work. Still not understanding? Check this out:
[Image: bd448a9d0ba4d224ad773a8ca742ac75.png]
[Image: f6587d69ebefe7257a19df6c95d41d9e.png]
The code for the picture above:
Code:
If MsgBox("Cancel the current operation?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
  Else
    e.Cancel = True
  End If

You see what I am getting at? Please help me, I do not specialize in MessageBoxes in VB.

The ANSWER TO THIS ALL:
[Image: d49ab706668edbd93c31328940fb82c6.png]


RE: [code help] VBscript InputBox Cancel If Statement - KoBE - 04-10-2011

Saw that you got you thread answered on HF. You might post the code on here in case someone on SF wants to know this as well.


RE: [code help] VBscript InputBox Cancel If Statement - Resistance - 04-10-2011

(04-10-2011, 03:00 PM)KoBE Wrote: Saw that you got you thread answered on HF. You might post the code on here in case someone on SF wants to know this as well.

Yeah plus rep the guy for me by +3

http://www.hackforums.net/member.php?action=profile&uid=511162