<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Cancel TaskDialog</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Controls : Cancel TaskDialog]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 18:52:23 +0000</pubDate>
  <lastBuildDate>Wed, 16 Jun 2010 08:50:15 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=16815</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Cancel TaskDialog : I not sure what exactly I need...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16815&amp;PID=58975&amp;title=cancel-taskdialog#58975</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 16815<br /><strong>Posted:</strong> 16 June 2010 at 8:50am<br /><br />I not sure what exactly I need to do to reproduce it, but such code works for me - I see 2 Debug outputs:<br /><br /><br />Private Sub Command1_Click()<br />TaskDialog1.AddButton "Test", 1<br />TaskDialog1.ShowDialog<br /><br />TaskDialog1.Reset<br /><br />TaskDialog1.AddButton "Test", 1<br />TaskDialog1.ShowDialog<br /><br /><br />End Sub<br /><br />Private Sub TaskDialog1_ButtonClicked(ByVal Id As Long, CloseDialog As Variant)<br />Debug.Print "TaskDialog1_ButtonClicked"<br />End Sub<br />]]>
   </description>
   <pubDate>Wed, 16 Jun 2010 08:50:15 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16815&amp;PID=58975&amp;title=cancel-taskdialog#58975</guid>
  </item> 
  <item>
   <title><![CDATA[Cancel TaskDialog : Since I haven&amp;#039;t had a reply...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16815&amp;PID=58965&amp;title=cancel-taskdialog#58965</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3113">corpcon</a><br /><strong>Subject:</strong> 16815<br /><strong>Posted:</strong> 16 June 2010 at 12:38am<br /><br /><P>Since I haven't had a reply about the recent issue, I'm guessing this is a bug. I'll rephrase it...</P><DIV>When I call the TaskDialog more than once from within the same procedure*, the&nbsp;ButtonClicked event only fires the first time.</DIV><DIV>&nbsp;</DIV><DIV>I've used reset, and set the Cancel to true after the call. It doesn't change anything.</DIV><DIV>&nbsp;</DIV><DIV>* it's in a loop, waiting for a valid response</DIV>]]>
   </description>
   <pubDate>Wed, 16 Jun 2010 00:38:53 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16815&amp;PID=58965&amp;title=cancel-taskdialog#58965</guid>
  </item> 
  <item>
   <title><![CDATA[Cancel TaskDialog : Clarification... The ButtonClicked...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16815&amp;PID=58903&amp;title=cancel-taskdialog#58903</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3113">corpcon</a><br /><strong>Subject:</strong> 16815<br /><strong>Posted:</strong> 11 June 2010 at 3:50pm<br /><br /><P>Clarification...</P><DIV>The ButtonClicked event DOES fire (sorry). However, it only fires once. If I don't receive&nbsp;an appropriate value, the code loops to re-open&nbsp;TaskDialog1 (I test vRC and, if needed,&nbsp;loop back to task_vInputBox). When it loops, the ButtonClicked event no longer fires. I have to exit the procedure to get it to fire again (which is impractical).</DIV><DIV>&nbsp;</DIV><DIV>I tried using Reset after retrieving the result, but that didn't work. Is there some other way to essentially set the control to nothing - or whatever needs to be done so that it works correctly?</DIV>]]>
   </description>
   <pubDate>Fri, 11 Jun 2010 15:50:37 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16815&amp;PID=58903&amp;title=cancel-taskdialog#58903</guid>
  </item> 
  <item>
   <title><![CDATA[Cancel TaskDialog : Perhaps I was likely too vague....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16815&amp;PID=58902&amp;title=cancel-taskdialog#58902</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3113">corpcon</a><br /><strong>Subject:</strong> 16815<br /><strong>Posted:</strong> 11 June 2010 at 3:17pm<br /><br /><P>Perhaps I was likely too vague. Allow me to elaborate.</P><DIV></DIV><DIV></DIV>I use the TaskDialog for various purposes on a single form. Consequently, I can't have in-line code in&nbsp;the ButtonClicked event. But I need to access the result of which button was clicked. Therefore, I have the following type of code...<DIV>&nbsp;</DIV><DIV>start procedure that does stuff...</DIV><DIV>Dim vRC&nbsp;as variant&nbsp;&nbsp; ' Return result from task dialog</DIV><DIV>blah</DIV><DIV>blah</DIV><DIV>blah</DIV><DIV>' Get a needed value</DIV><DIV>vRC = task_vInputBox(Me, TaskDialog1, sTitle, sHeading, sDescription, "", "", "", sIconPath)&nbsp;&nbsp;&nbsp; ' Set properties and open (.ShowDialog)</DIV><DIV><DIV>' Deal with returned&nbsp;value</DIV><DIV>blah</DIV><DIV>blah</DIV><DIV>blah</DIV><DIV>end of procedure</DIV></DIV><DIV>&nbsp;</DIV><DIV>' The result assigned to vRC obviously&nbsp;comes from .InputBoxText (which is currently part of the task_vInputBox function)&nbsp;- but what if the Cancel button was clicked?</DIV><DIV>&nbsp;</DIV><DIV>Instead of retrieving the value from&nbsp;my function call,&nbsp;I tried assigning the result of the .InputBoxText (unless Cancel was clicked) by using&nbsp;a public variable in the ButtonClicked event, to see if that would address my problem. However, that didn't work because the ButtonClicked event wasn't firing. I don't know why.</DIV>]]>
   </description>
   <pubDate>Fri, 11 Jun 2010 15:17:46 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16815&amp;PID=58902&amp;title=cancel-taskdialog#58902</guid>
  </item> 
  <item>
   <title><![CDATA[Cancel TaskDialog : Private Sub taskDialog_ButtonClicked(ByVal...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16815&amp;PID=58901&amp;title=cancel-taskdialog#58901</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=369">SuperMario</a><br /><strong>Subject:</strong> 16815<br /><strong>Posted:</strong> 11 June 2010 at 1:12pm<br /><br />Private Sub taskDialog_ButtonClicked(ByVal id As Long, CloseDialog As Variant)<br>&nbsp;&nbsp;&nbsp; On Error Resume Next<br>&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp;&nbsp; Select Case id<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case xtpTaskButtonCancel:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Debug.Print "cancel button clicked"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case Else:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CloseDialog = True<br>&nbsp;&nbsp;&nbsp; End Select<br>End Sub <br>]]>
   </description>
   <pubDate>Fri, 11 Jun 2010 13:12:09 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16815&amp;PID=58901&amp;title=cancel-taskdialog#58901</guid>
  </item> 
  <item>
   <title><![CDATA[Cancel TaskDialog : I don&amp;#039;t understand how to...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16815&amp;PID=58900&amp;title=cancel-taskdialog#58900</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3113">corpcon</a><br /><strong>Subject:</strong> 16815<br /><strong>Posted:</strong> 11 June 2010 at 1:09pm<br /><br />I don't understand how to access the buttonclicked event. Can you give me a VB 6 code example?]]>
   </description>
   <pubDate>Fri, 11 Jun 2010 13:09:36 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16815&amp;PID=58900&amp;title=cancel-taskdialog#58900</guid>
  </item> 
  <item>
   <title><![CDATA[Cancel TaskDialog : Do you mean the CommonButtons?...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16815&amp;PID=58899&amp;title=cancel-taskdialog#58899</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=369">SuperMario</a><br /><strong>Subject:</strong> 16815<br /><strong>Posted:</strong> 11 June 2010 at 1:02pm<br /><br />Do you mean the CommonButtons?&nbsp; If so, then the ID of the button in ButtonClicked event will be a value from the TaskDialogCommonButtons enum, in this case xtpTaskButtonCancel (8).]]>
   </description>
   <pubDate>Fri, 11 Jun 2010 13:02:07 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16815&amp;PID=58899&amp;title=cancel-taskdialog#58899</guid>
  </item> 
  <item>
   <title><![CDATA[Cancel TaskDialog : How do you determine if the Cancel...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16815&amp;PID=58898&amp;title=cancel-taskdialog#58898</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3113">corpcon</a><br /><strong>Subject:</strong> 16815<br /><strong>Posted:</strong> 11 June 2010 at 12:41pm<br /><br />How do you determine if the Cancel button was clicked in the TaskDialog?<DIV>&nbsp;</DIV><DIV>I assume it has something to do with the ButtonClicked event, but I don't understand how to implement what is described in the Help. And I couldn't find anything in the samples.</DIV>]]>
   </description>
   <pubDate>Fri, 11 Jun 2010 12:41:16 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16815&amp;PID=58898&amp;title=cancel-taskdialog#58898</guid>
  </item> 
 </channel>
</rss>