Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Tab Selection Progmatically ?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Tab Selection Progmatically ?

 Post Reply Post Reply
Author
Message
XpatTech View Drop Down
Groupie
Groupie
Avatar

Joined: 26 November 2007
Location: United Kingdom
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote XpatTech Quote  Post ReplyReply Direct Link To This Post Topic: Tab Selection Progmatically ?
    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...
Back to Top
joeliner View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 June 2006
Status: Offline
Points: 273
Post Options Post Options   Thanks (0) Thanks(0)   Quote joeliner Quote  Post ReplyReply Direct Link To This Post Posted: 27 November 2007 at 5:48am
Hi,

Dim ribbon As RibbonBar
Set ribbon = CommandBars.ActiveMenuBar
ribbon.Tab(3).Selected = True
Back to Top
XpatTech View Drop Down
Groupie
Groupie
Avatar

Joined: 26 November 2007
Location: United Kingdom
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote XpatTech Quote  Post ReplyReply Direct Link To This Post Posted: 27 November 2007 at 5:52am
All i get is

Runtime error '91':

Object variable or With block variable not set.

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: 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
Back to Top
XpatTech View Drop Down
Groupie
Groupie
Avatar

Joined: 26 November 2007
Location: United Kingdom
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote XpatTech Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
joeliner View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 June 2006
Status: Offline
Points: 273
Post Options Post Options   Thanks (0) Thanks(0)   Quote joeliner Quote  Post ReplyReply Direct Link To This Post 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.


Back to Top
XpatTech View Drop Down
Groupie
Groupie
Avatar

Joined: 26 November 2007
Location: United Kingdom
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote XpatTech Quote  Post ReplyReply Direct Link To This Post 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 ?
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: 29 November 2007 at 1:38am
ribbon.Tab(1).Selected = True
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
XpatTech View Drop Down
Groupie
Groupie
Avatar

Joined: 26 November 2007
Location: United Kingdom
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote XpatTech Quote  Post ReplyReply Direct Link To This Post 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 ?)
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.