<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Get inputbox response in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Get-inputbox-response/m-p/160100#M34485</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;How I can I detect the response to an inputbox prompt in a macro? Neither of the inputbox methods below seem to work:&lt;/P&gt;&lt;P&gt;oldtext = ActiveDocument.Evaluate("vBookmarkID")&lt;BR /&gt;' t = ActiveDocument.GetApplication.InputBox("Enter Quote ID:",oldtext)&lt;BR /&gt; t = InputBox("Enter Quote ID:", "Create Quote Bookmark")&lt;BR /&gt;if t = vbCancel then&lt;BR /&gt;msgbox("Cancelled")&lt;BR /&gt;end if&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Feb 2010 17:33:48 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-02-25T17:33:48Z</dc:date>
    <item>
      <title>Get inputbox response</title>
      <link>https://community.qlik.com/t5/QlikView/Get-inputbox-response/m-p/160100#M34485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;How I can I detect the response to an inputbox prompt in a macro? Neither of the inputbox methods below seem to work:&lt;/P&gt;&lt;P&gt;oldtext = ActiveDocument.Evaluate("vBookmarkID")&lt;BR /&gt;' t = ActiveDocument.GetApplication.InputBox("Enter Quote ID:",oldtext)&lt;BR /&gt; t = InputBox("Enter Quote ID:", "Create Quote Bookmark")&lt;BR /&gt;if t = vbCancel then&lt;BR /&gt;msgbox("Cancelled")&lt;BR /&gt;end if&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Feb 2010 17:33:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-inputbox-response/m-p/160100#M34485</guid>
      <dc:creator />
      <dc:date>2010-02-25T17:33:48Z</dc:date>
    </item>
    <item>
      <title>Get inputbox response</title>
      <link>https://community.qlik.com/t5/QlikView/Get-inputbox-response/m-p/160101#M34486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With the VB InputBox (the second one), you can determine if the user clicks Cancel or clicks Ok with a blank input. Use:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sub Responser&lt;BR /&gt; t = inputbox("What is your answer")&lt;BR /&gt; if t = False Then&lt;BR /&gt; msgbox("Cancel")&lt;BR /&gt; ElseIf t = "" Then&lt;BR /&gt; msgbox("Blank Response")&lt;BR /&gt; Else&lt;BR /&gt; msgbox(t)&lt;BR /&gt; End If&lt;BR /&gt;End Sub&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;If you don't need an input and you just want the user to click Ok or Cancel, you should use MsgBox instead as that will return a value based on which button was clicked.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Feb 2010 18:01:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-inputbox-response/m-p/160101#M34486</guid>
      <dc:creator />
      <dc:date>2010-02-25T18:01:52Z</dc:date>
    </item>
    <item>
      <title>Get inputbox response</title>
      <link>https://community.qlik.com/t5/QlikView/Get-inputbox-response/m-p/160102#M34487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;I had just sorted it out with a 'len' test eg&lt;/P&gt;&lt;P&gt;if len(t) = 0 then&lt;BR /&gt; msgbox("Cancelled")&lt;BR /&gt; else&lt;BR /&gt; msgbox("OKed")&lt;BR /&gt;end if&lt;/P&gt;&lt;P&gt;Interestingly, using the 'ActiveDocument.GetApplication.InputBox' method, the OK button is not available unless something is entered. This is much better than the native VBS inputbox where 'cancel ' returns a 0 length but so does nothing entered and an 'ok'&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Feb 2010 18:10:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-inputbox-response/m-p/160102#M34487</guid>
      <dc:creator />
      <dc:date>2010-02-25T18:10:43Z</dc:date>
    </item>
    <item>
      <title>Get inputbox response</title>
      <link>https://community.qlik.com/t5/QlikView/Get-inputbox-response/m-p/160103#M34488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My solution can tell the difference between clicking Cancel and clicking Ok without entering anything. In both cases, len(t) = 0. When a user clicks Cancel, t is false. If they click Ok with a blank entry, t is the empty string, "". It may not matter in your app though.&lt;/P&gt;&lt;P&gt;Disabling Ok until there is an entry is probably a better way to handle it. I tend to use the VB Script versions, because I've used them before. The QlikView versions are probably better from the user's perspective.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Feb 2010 20:12:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-inputbox-response/m-p/160103#M34488</guid>
      <dc:creator />
      <dc:date>2010-02-25T20:12:17Z</dc:date>
    </item>
  </channel>
</rss>

