<?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 : How to add items in commandbar combobox</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : How to add items in commandbar combobox]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 14 Jun 2026 19:33:45 +0000</pubDate>
  <lastBuildDate>Wed, 04 Mar 2009 09:10:42 +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=13569</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[How to add items in commandbar combobox :   Hi Oleg :DThanks for the reply,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13569&amp;PID=46251&amp;title=how-to-add-items-in-commandbar-combobox#46251</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5018">eihkir</a><br /><strong>Subject:</strong> 13569<br /><strong>Posted:</strong> 04 March 2009 at 9:10am<br /><br />Hi Oleg :D<br><br>Thanks for the reply, but I've finally found the solution myself. <img src="http://forum.codejock.com/smileys/smiley4.gif" border="0" align="absmiddle"><br><br>The problem is, the active tab. we must select the active tab first, then we can modify the control on the tab.<br>This is how I did it:<br><br>'select the tab where the control resides<br>RibbonBar.FindTab(ID_TAB_REPORT).Selected = True <br><br>'set the control to the one we want to modify<br>Set Combo = RibbonBar.FindControl(xtpControlComboBox, ID_REPORT_BULAN, True)<br><br>'modify the control<br>For I = 1 To 12<br>&nbsp;&nbsp;&nbsp; Combo.AddItem Str(I)<br>Next I<br><br>That's It!&nbsp; <img src="http://forum.codejock.com/smileys/smiley32.gif" border="0" align="absmiddle">]]>
   </description>
   <pubDate>Wed, 04 Mar 2009 09:10:42 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13569&amp;PID=46251&amp;title=how-to-add-items-in-commandbar-combobox#46251</guid>
  </item> 
  <item>
   <title><![CDATA[How to add items in commandbar combobox : Hi,  try set False for &amp;#034;Visible&amp;#034;...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13569&amp;PID=46227&amp;title=how-to-add-items-in-commandbar-combobox#46227</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 13569<br /><strong>Posted:</strong> 04 March 2009 at 3:18am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>try set False for "Visible" parameter</DIV>]]>
   </description>
   <pubDate>Wed, 04 Mar 2009 03:18:24 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13569&amp;PID=46227&amp;title=how-to-add-items-in-commandbar-combobox#46227</guid>
  </item> 
  <item>
   <title><![CDATA[How to add items in commandbar combobox :   Hi, I&amp;#039;m using:-XP SP2-Codejock...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13569&amp;PID=46215&amp;title=how-to-add-items-in-commandbar-combobox#46215</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=5018">eihkir</a><br /><strong>Subject:</strong> 13569<br /><strong>Posted:</strong> 04 March 2009 at 12:49am<br /><br />Hi, <img src="http://forum.codejock.com/smileys/smiley1.gif" border="0" align="absmiddle"><br><br>I'm using:<br>-XP SP2<br>-Codejock 12.1.1<br>-VB 6<br><br>I've made an mdi form featured with ribbon bar, and for the ribbon design I used the codejock command bars designer and I was happy for it's result.<br>It really looks great!<br><br>The problem for me is that, in the mdi form load procedure, after I load the command bars design, <br>I succeeded adding some items in a combo box, But that's not the case with adding another items to another combo box in another tab but in the same command bar.<br>VB 6 always said that "object variable or with block variable not set.<br><br>you see, the other combo box is located in another tab. Would that matter?<br><br>Here's the code:<br><br>Private Sub MDIForm_Load()<br><br>&nbsp;&nbsp;&nbsp; CommandBarsGlobalSettings.App = App<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Me.Left = GetSetting(App.Title, "Settings", "MainLeft", Me.Left)<br>&nbsp;&nbsp;&nbsp; Me.Top = GetSetting(App.Title, "Settings", "MainTop", Me.Top)<br>&nbsp;&nbsp;&nbsp; Me.Width = GetSetting(App.Title, "Settings", "MainWidth", Me.Width)<br>&nbsp;&nbsp;&nbsp; Me.Height = GetSetting(App.Title, "Settings", "MainHeight", Me.Height)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; 'Loads an xcb file created by the designer<br>&nbsp;&nbsp;&nbsp; CommandBars.LoadDesignerBars App.Path &amp; "\simbakda.xcb"<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; 'Loads nama Provinsi<br>&nbsp;&nbsp;&nbsp; Dim RibbonBar As RibbonBar<br>&nbsp;&nbsp;&nbsp; Set RibbonBar = CommandBars.ActiveMenuBar<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Dim Combo As CommandBarComboBox<br>&nbsp;&nbsp;&nbsp; Set Combo = RibbonBar.FindControl(xtpControlComboBox, ID_REPORT_PROVINSI, True)<br>&nbsp;&nbsp;&nbsp; Set db = OpenDatabase(App.Path &amp; "\database.mdb")<br>&nbsp;&nbsp;&nbsp; Set rs = db.OpenRecordset("provinsi")<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; While Not rs.EOF<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Combo.AddItem rs!id_prov &amp; "&nbsp; " &amp; rs!nama_prov<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rs.MoveNext<br>&nbsp;&nbsp;&nbsp; Wend<br>&nbsp;&nbsp;&nbsp; db.Close<br>&nbsp;&nbsp;&nbsp; Set db = Nothing<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; 'the above code suceeded to add items to a combo box in the ribbon commandbar<br>&nbsp;&nbsp;&nbsp; 'but, i can't find a way to add items to another combo box in the same commandbar but in another tab<br>&nbsp;&nbsp;&nbsp; 'what should I do?<br><br>&nbsp;&nbsp;&nbsp; '----this produced error massage object variable or with block variable not set.<br><br>&nbsp;&nbsp;&nbsp; Dim Combo2 As CommandBarComboBox<br>&nbsp;&nbsp;&nbsp; Set Combo2 = RibbonBar.FindControl(xtpControlComboBox, ID_REPORT_PERIODEBULAN, True)<br>&nbsp;&nbsp;&nbsp; For i = 1 To 12<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Combo2.AddItem MonthName(i)<br>&nbsp;&nbsp;&nbsp; Next i<br><br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; '----this runs well<br>&nbsp;&nbsp;&nbsp; Dim StatusBar As StatusBar<br>&nbsp;&nbsp;&nbsp; Set StatusBar = CommandBars.StatusBar<br>&nbsp;&nbsp;&nbsp; StatusBar.Visible = True<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; StatusBar.AddPane 0<br>&nbsp;&nbsp;&nbsp; StatusBar.AddPane ID_INDICATOR_CAPS<br>&nbsp;&nbsp;&nbsp; StatusBar.AddPane ID_INDICATOR_NUM<br>&nbsp;&nbsp;&nbsp; StatusBar.AddPane ID_INDICATOR_SCRL<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; RibbonBar.EnableFrameTheme<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; CommandBars.Options.KeyboardCuesShow = xtpKeyboardCuesShowWindowsDefault<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; CommandBars.EnableCustomization True<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; WorkspaceVisible = True<br>&nbsp;&nbsp;&nbsp; CommandBars.ShowTabWorkspace True<br>&nbsp;&nbsp;&nbsp; <br>End Sub<br><br>How can I call the exact combo box to do some modification to it?<br><br>It's been 2 days since I haven't found the way to do it correctly.<br>I really appreciate your help guys. Thanks A Lot.<br>]]>
   </description>
   <pubDate>Wed, 04 Mar 2009 00:49:16 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13569&amp;PID=46215&amp;title=how-to-add-items-in-commandbar-combobox#46215</guid>
  </item> 
 </channel>
</rss>