Excel Ribbon Custom Tab Activation - Excel 2010

Joined
Feb 24, 2012
Messages
1
Reaction score
0
Good Morning,

I am very new to forums so please excuse me if i have posted this in the wrong section.

I am looking for some assistance with the VBA code for a custom tab for my excel programme.
I use Office excel 2010 and have created a custom tab called "Sales Tab" on my custom ribbon which is the access point to my programme and will always be visible, this will allow me to choose 2 separate Custom Tabs (Tab2 ="TREND” & Tab3= “Siemens”) dependant on whichever system I want to use. The 2 custom tabs remain invisible until activated by a button on my "Sales Tab". When I choose for example to activate the “TREND” tab I would like it to come to the forefront and show as active , the problem I have however is that it always goes to the rear of the "Sales Tab" and I need to 'click' it to make it active.

I have tried various methods as listed on the MSDN magazine (i.e. Activate tabQ, insertBefore, etc) but nothing is working! Is it something i am doing wrong?

Snippet of my XML coding;

<!--RibbonX Visual Designer 1.93 for Microsoft Excel 12.0. XML Code produced on 2011/03/17-->
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="rbx_onLoad" >

<!-- ****Disable 'Exit Excel' and 'Excel Options' on the Office button menu****-->
<!-- **************************************************************************-->

<commands>
<!-- Disable Excel Options on the Office button menu-->
<command idMso="ApplicationOptionsDialog" enabled="false"/>

<!-- Disable Exit Excel on the Office button menu-->
<command idMso="FileExit" enabled="false"/>
</commands>


<!-- **********Set startFromScratch to true to hide the ribbon**********-->
<!-- **********Hide New, Open and Save on the Office button menu********-->

<!-- Set startFromScratch to true to hide the ribbon-->
<ribbon startFromScratch="true">


<!-- startFromScratch="true" hides all of the ribbon tabs and it hides the QAT. -->
<!-- It also hides most of the commands on the Office button menu, but for some -->
<!-- reason, it does not hide the 'New', 'Open' and 'Save' commands. -->
<!-- So if you want to hide them you have to add this to your RibbonX file: -->


<tabs >
<!-- **********Custom Tab1 - Sales**************************************-->
<!-- **********Activates Gateway to Sales Programme*********************-->

<tab id="Tab1"
label="Sales">

<!-- **********Group 1 - General ***************************************-->
<!-- **********Access to General Office Commands************************-->

<group id="Group1"
label="General">

<button id="Button11"
size="large"
onAction="Save"
visible="true"
imageMso="FileSave"
label="Save/Close"/>

<!-- **********Custom Tab2 - TREND**************************************************-->
<!-- **********Activates Spreadsheets Tailored for TREND System*********************-->

<tab id="Tab2"
label="TREND"
getVisible="GetVisible3"
tag="MyPersonalGroup3" >

<!-- **********Group 7 - TREND Templates********************************************-->
<!-- **********Choose Template of Structured Typical Applications ******************-->

<group id="Group7"
label="TREND Templates"
getVisible="GetVisible3"
tag="MyPersonalGroup3" >

<button id="Button71"
image="T517436856"
label="Standard Boiler Plant"
supertip="Click to insert template"
onAction="Button71_onAction"
description="IQ3 System"/>

<!-- **********Custom Tab3 - SIEMENS**************************************************-->
<!-- **********Activates Spreadsheets Tailored for SIEMENS System*********************-->

<tab id="Tab3"
label="SIEMENS"
getVisible="GetVisible4"
tag="MyPersonalGroup4" >

<!-- **********Group 8 - SIEMENS Templates********************************************-->
<!-- **********Choose Template of Structured Typical Applications ******************-->

<group id="Group8"
label="SIEMENS Templates"
getVisible="GetVisible4"
tag="MyPersonalGroup4" >

<button id="Button81"
image="T517436856"
label="Standard Boiler Plant"
supertip="Click to insert template"
onAction="Button81_onAction"
description="PX System"/>

Thank you in advance for any assistance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top