Print Page | Close Window

Tab Selection Progmatically ?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=8917
Printed Date: 16 May 2024 at 7:10am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Tab Selection Progmatically ?
Posted By: XpatTech
Subject: Tab Selection Progmatically ?
Date Posted: 27 November 2007 at 5:06am
Is it possible to select a tab progmatically, ie force a tab selection using software in the Ribbon Bar sample...



Replies:
Posted By: joeliner
Date Posted: 27 November 2007 at 5:48am
Hi,

Dim ribbon As RibbonBar
Set ribbon = CommandBars.ActiveMenuBar
ribbon.Tab(3).Selected = True


Posted By: XpatTech
Date Posted: 27 November 2007 at 5:52am
All i get is

Runtime error '91':

Object variable or With block variable not set.



Posted By: Oleg
Date Posted: 27 November 2007 at 10:12am
Hi,
 
Have to work - its right code. May be you don't have 3 tabs.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: XpatTech
Date Posted: 27 November 2007 at 10:38am
Its the RibbonBar sample, it has more than 3. I may be getting the tabs I see
mistaken for something else. Have a look at it, then laugh at me. If i have got it wrong can you explain what to do.


Posted By: joeliner
Date Posted: 28 November 2007 at 10:25am
Try check again.
pls note, index 3 shows the fourth tab.

...also you can post the code yu use on ribbonsample.




Posted By: XpatTech
Date Posted: 28 November 2007 at 10:51am
No alterations have been made to the original code.

Assume a button is used to select tab 2, how would that be coded ?


Posted By: Oleg
Date Posted: 29 November 2007 at 1:38am
ribbon.Tab(1).Selected = True


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: XpatTech
Date Posted: 29 November 2007 at 4:01am
Thanks guys, not got a clue why it did not work at first (Probably stupid user) but I opened new  ribbon sample and it worked first time. Again, thanks for helping a newbie..

I'll be back...............(Arnie I think ?)



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net