Looping buttons on a command bar |
Post Reply |
Author | |
PhilJeary
Newbie Joined: 16 March 2004 Location: United Kingdom Status: Offline Points: 17 |
Post Options
Thanks(0)
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.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |