<?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 : Changing .Enabled in design time</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Changing .Enabled in design time]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 15 Jun 2026 00:12:37 +0000</pubDate>
  <lastBuildDate>Tue, 28 Apr 2009 09:00:20 +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=14159</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[Changing .Enabled in design time : Thank you. I got this to work...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14159&amp;PID=48446&amp;title=changing-enabled-in-design-time#48446</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5181">Mess</a><br /><strong>Subject:</strong> 14159<br /><strong>Posted:</strong> 28 April 2009 at 9:00am<br /><br />Thank you. I got this to work by setting the status bar to Nothing and then instantiating a new StatusBar after that.<DIV>&nbsp;</DIV><DIV>Thanks.</DIV>]]>
   </description>
   <pubDate>Tue, 28 Apr 2009 09:00:20 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14159&amp;PID=48446&amp;title=changing-enabled-in-design-time#48446</guid>
  </item> 
  <item>
   <title><![CDATA[Changing .Enabled in design time : Here&amp;#039;s some code that I just...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14159&amp;PID=48440&amp;title=changing-enabled-in-design-time#48440</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 14159<br /><strong>Posted:</strong> 28 April 2009 at 6:48am<br /><br />Here's some code that I just test that works. You need a form with a CommandBars control (CommandBars1) and a standard VB6 CommandButton control (Command1):<br><br><table width="99%"><tr><td><pre class="BBcode"><br>Option Explicit<br><br>Private mo_TestAction As CommandBarAction<br><br>Private Sub Command1_Click()<br>&nbsp;&nbsp; mo_TestAction.Enabled = Not mo_TestAction.Enabled<br>End Sub<br><br>Private Sub Form_Load()<br><br>&nbsp;&nbsp; With Me.CommandBars1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set mo_TestAction = .Actions.Add(100, "Action Test", "This is a test", "Testing Testing", "Test")<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Item(1).Controls.Add xtpControlButton, 100, ""<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Item(1).Controls.Add xtpControlButton, 101, "Test2"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .Item(1).Controls.Add xtpControlButton, 102, "Test3"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .EnableActions<br>&nbsp;&nbsp; End With<br>End Sub<br></pre></td></tr></table><br><br>The key for me was to define the Action <b>before</b> adding the controls.<br>]]>
   </description>
   <pubDate>Tue, 28 Apr 2009 06:48:01 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14159&amp;PID=48440&amp;title=changing-enabled-in-design-time#48440</guid>
  </item> 
  <item>
   <title><![CDATA[Changing .Enabled in design time : Hi,  I&amp;#039;m trying to set...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14159&amp;PID=48402&amp;title=changing-enabled-in-design-time#48402</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5181">Mess</a><br /><strong>Subject:</strong> 14159<br /><strong>Posted:</strong> 27 April 2009 at 2:14pm<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>I'm trying to set the visibility and to enable and disable controls at run-time. I'm using Actions as described and have also read the sample code, but I don't seem to get it to work.</DIV><DIV>&nbsp;</DIV><DIV>I created the action before everything else is created, and add this simple code when clicking a button:</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp; Dim Action As CommandBarAction<BR>&nbsp;&nbsp;&nbsp; Set Action = CommandBars.Actions(ID_HTML_EDIT)</DIV><DIV>&nbsp;</DIV><DIV>When I change the Action.Enabled the properties changes&nbsp;as they should, &nbsp;but the button doesn't gray out of disappear as I want visually. What seems to be the problem here?</DIV><DIV>&nbsp;</DIV><DIV>Thank you,</DIV><DIV>Bjarne</DIV>]]>
   </description>
   <pubDate>Mon, 27 Apr 2009 14:14:15 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14159&amp;PID=48402&amp;title=changing-enabled-in-design-time#48402</guid>
  </item> 
 </channel>
</rss>