<?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 : enable/disable entire command bar?</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : enable/disable entire command bar?]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 14 May 2026 07:14:20 +0000</pubDate>
  <lastBuildDate>Wed, 15 Jul 2009 11:56: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=14747</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[enable/disable entire command bar? : This is how I set the command...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14747&amp;PID=50995&amp;title=enable-disable-entire-command-bar#50995</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3253">Mr.Den</a><br /><strong>Subject:</strong> 14747<br /><strong>Posted:</strong> 15 July 2009 at 11:56am<br /><br /><DIV>This is how I set the command bar controls to disabled:</DIV><DIV>&nbsp;</DIV><DIV>Dim obBar As CommandBar<BR>Dim obCtrl As CommandBarControl</DIV><P>Dim iLCtr As Integer</P><P>On Error GoTo errHandler<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; Set obBar = CommandBars.item(2)<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; If bMActive = True Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; obCtrl.Enabled = False<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Next iLCtr<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; End If</P><P>errHandler:<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; If Err.Number Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MsgBox Err.Number &amp; ",&nbsp; " &amp; Err.Description, vbCritical, "SetActive"<BR>&nbsp;&nbsp;&nbsp; End If</P><DIV>&nbsp;</DIV><DIV>Edit:</DIV><DIV>&nbsp;</DIV><DIV>Had to leave aburuptly <img src="http://forum.codejock.com/smileys/smiley4.gif" border="0">, so here goes: </DIV><DIV>&nbsp;</DIV><DIV>Pass a boolean value to a sub, or as I did, I used bMActive as a modular level variable.</DIV><DIV>&nbsp;</DIV><DIV>Use a for/next loop to iterate through the controls on the commandbar, and set the Enabled&nbsp;property as needed, depending on the Id if desired.</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 15 Jul 2009 11:56:20 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14747&amp;PID=50995&amp;title=enable-disable-entire-command-bar#50995</guid>
  </item> 
  <item>
   <title><![CDATA[enable/disable entire command bar? : Hi,  Guess you can just add...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14747&amp;PID=50976&amp;title=enable-disable-entire-command-bar#50976</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 14747<br /><strong>Posted:</strong> 15 July 2009 at 1:36am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>Guess you can just add some varaible that Save process is running and exit from Execute event if so.</DIV>]]>
   </description>
   <pubDate>Wed, 15 Jul 2009 01:36:07 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14747&amp;PID=50976&amp;title=enable-disable-entire-command-bar#50976</guid>
  </item> 
  <item>
   <title><![CDATA[enable/disable entire command bar? : Is there a way to disable then...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=14747&amp;PID=50966&amp;title=enable-disable-entire-command-bar#50966</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3289">DanielWilson</a><br /><strong>Subject:</strong> 14747<br /><strong>Posted:</strong> 14 July 2009 at 5:29pm<br /><br />Is there a way to disable then re-enable the entire command bar?<br><br>I have a customer using 11.2 and they have a long-running Save routine. If you click Save, then click several command buttons, the whole app crashes.&nbsp; Sometimes only 1 button click is needed.<br><br>I believe that if I can prevent the user from clicking another button until that Save is complete, I can stop the crashes.&nbsp; At least, I want to test that hypothesis.<br><br>So ... can I disable the command bar?<br><br>Thanks!<br>]]>
   </description>
   <pubDate>Tue, 14 Jul 2009 17:29:21 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=14747&amp;PID=50966&amp;title=enable-disable-entire-command-bar#50966</guid>
  </item> 
 </channel>
</rss>