Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[code help] VBscript InputBox Cancel If Statement
#1
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]
[Image: t5BWm.png]
Reply
#2
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.
Reply
#3
(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?act...uid=511162

[Image: t5BWm.png]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Get Country Code In 1 Line Of Code. wchar_t 13 4,644 11-28-2012, 06:49 AM
Last Post: Cubs
  [Vb.net] Closing Event Example Ok or Cancel [SRC] [Simple] ★ASI_F★™ 9 2,306 07-08-2011, 09:37 PM
Last Post: AceInfinity

Forum Jump:


Users browsing this thread: 2 Guest(s)