Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - Looping buttons on a command bar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Looping buttons on a command bar

 Post Reply Post Reply
Author
Message
PhilJeary View Drop Down
Newbie
Newbie
Avatar

Joined: 16 March 2004
Location: United Kingdom
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote PhilJeary Quote  Post ReplyReply Direct Link To This Post Topic: Looping buttons on a command bar
    Posted: 30 August 2006 at 4:58am
Hi,
 
I'm trying to loop through the buttons on a command bar.
 
I have added a command bar using:
 
Dim ToolBar As CommandBar
Set ToolBar = CommandBars.Add("Standard", xtpBarTop)
 
I have added a load of buttons using (for example):
 
.Add xtpControlButton, 1, "Test"
 
I now need to do something like:
 
Dim x as CommandBarControl
For each x in commandbars("standard")
  if x.id <10 then x.visible = false
Next x
 
However, I can't see to find the syntax I need for declaring X and referencing the command bar I created called "Standard".
 
Any help would be much appreciated.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 30 August 2006 at 8:49am
Try
 
Dim x as CommandBarControl
For each x in ToolBar.Controls
  if x.id <10 then x.visible = false
Next
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.