Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding Menus to the Ribbon
I have a 2007 Add-In workbook that has XML in it to add a Custon Menu Tab in
the Ribbon. How can I ensure that the tab is always placed last in the Ribbon. For example, Home, Insert, Page Layout, ...., Developer, CUSTOM TAB HERE. Plus, I have noticed that if I save the workbook with a .xls extension the Ribbon goes back to default settings when activating another workbook and back to the custom settings I have when the my workbook is reactivated. Why does it not do that when I have the workbook saved with a .xla extension? -- Cheers, Ryan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding Menus to the Ribbon
Hi Ryan Use insertAfterMso <tab id="MyCustomTab" label="My Tab" insertAfterMso="TabDeveloper" Plus, I have noticed that if I save the workbook with a .xls extension the Ribbon goes back to default settings when activating another workbook and back to the custom settings I have when the my workbook is reactivated. Why does it not do that when I have the workbook saved with a .xla extension? That's normal in 2007 A xla is a hidden workbook and the code/menus that is in it you want to use in all open workbooks that is in the xla. In a normal workbook it will load the ribbonX when you activate the workbook and remove your changes when you deactivate it -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "RyanH" wrote in message ... I have a 2007 Add-In workbook that has XML in it to add a Custon Menu Tab in the Ribbon. How can I ensure that the tab is always placed last in the Ribbon. For example, Home, Insert, Page Layout, ...., Developer, CUSTOM TAB HERE. Plus, I have noticed that if I save the workbook with a .xls extension the Ribbon goes back to default settings when activating another workbook and back to the custom settings I have when the my workbook is reactivated. Why does it not do that when I have the workbook saved with a .xla extension? -- Cheers, Ryan |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding Menus to the Ribbon
Thanks for the reply. Since I am using a Add-In workbook is there a way to
hide the custom tab when the workbook I want to use the tab in is deactivated and then unhide it when the workbook is activated? If not, I will just make sure to test the workbook I want to use the tab in is the activeworkbook before any of the buttons execute there code. -- Cheers, Ryan "Ron de Bruin" wrote: Hi Ryan Use insertAfterMso <tab id="MyCustomTab" label="My Tab" insertAfterMso="TabDeveloper" Plus, I have noticed that if I save the workbook with a .xls extension the Ribbon goes back to default settings when activating another workbook and back to the custom settings I have when the my workbook is reactivated. Why does it not do that when I have the workbook saved with a .xla extension? That's normal in 2007 A xla is a hidden workbook and the code/menus that is in it you want to use in all open workbooks that is in the xla. In a normal workbook it will load the ribbonX when you activate the workbook and remove your changes when you deactivate it -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "RyanH" wrote in message ... I have a 2007 Add-In workbook that has XML in it to add a Custon Menu Tab in the Ribbon. How can I ensure that the tab is always placed last in the Ribbon. For example, Home, Insert, Page Layout, ...., Developer, CUSTOM TAB HERE. Plus, I have noticed that if I save the workbook with a .xls extension the Ribbon goes back to default settings when activating another workbook and back to the custom settings I have when the my workbook is reactivated. Why does it not do that when I have the workbook saved with a .xla extension? -- Cheers, Ryan |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding Menus to the Ribbon
Why do you want to use it is a add-in ?
-- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "RyanH" wrote in message ... Thanks for the reply. Since I am using a Add-In workbook is there a way to hide the custom tab when the workbook I want to use the tab in is deactivated and then unhide it when the workbook is activated? If not, I will just make sure to test the workbook I want to use the tab in is the activeworkbook before any of the buttons execute there code. -- Cheers, Ryan "Ron de Bruin" wrote: Hi Ryan Use insertAfterMso <tab id="MyCustomTab" label="My Tab" insertAfterMso="TabDeveloper" Plus, I have noticed that if I save the workbook with a .xls extension the Ribbon goes back to default settings when activating another workbook and back to the custom settings I have when the my workbook is reactivated. Why does it not do that when I have the workbook saved with a .xla extension? That's normal in 2007 A xla is a hidden workbook and the code/menus that is in it you want to use in all open workbooks that is in the xla. In a normal workbook it will load the ribbonX when you activate the workbook and remove your changes when you deactivate it -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "RyanH" wrote in message ... I have a 2007 Add-In workbook that has XML in it to add a Custon Menu Tab in the Ribbon. How can I ensure that the tab is always placed last in the Ribbon. For example, Home, Insert, Page Layout, ...., Developer, CUSTOM TAB HERE. Plus, I have noticed that if I save the workbook with a .xls extension the Ribbon goes back to default settings when activating another workbook and back to the custom settings I have when the my workbook is reactivated. Why does it not do that when I have the workbook saved with a .xla extension? -- Cheers, Ryan |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding Menus to the Ribbon
How can I ensure that the tab is always placed last in the Ribbon.
<tab id="MyCustomTab" label="My Tab" insertAfterMso="TabDeveloper" If you leave the insertAfterMso="TabDeveloper" out completely I believe Excel will place your group last at the time it adds the group. The above places the group between the Developer tab but before Add-ins if you have that displayed. I say "at the time it adds the group" because a later loaded workbook or add-in can have its group placed after yours so you cannot force your to always be last. Re changing the tab's visibility at runtime, you should be able to do that by invalidating the ribbon with the workbook activate and deactivate events along with using the getVisible attribute to name a procedure returning the visible state. -- Jim "Ron de Bruin" wrote in message ... | | Hi Ryan | | Use insertAfterMso | | <tab id="MyCustomTab" label="My Tab" insertAfterMso="TabDeveloper" | | | Plus, I have noticed that if I save the workbook with a .xls extension the | Ribbon goes back to default settings when activating another workbook and | back to the custom settings I have when the my workbook is reactivated. Why | does it not do that when I have the workbook saved with a .xla extension? | | That's normal in 2007 | A xla is a hidden workbook and the code/menus that is in it you want to use in all | open workbooks that is in the xla. | | In a normal workbook it will load the ribbonX when you activate the workbook and | remove your changes when you deactivate it | | | | -- | | Regards Ron de Bruin | http://www.rondebruin.nl/tips.htm | | | "RyanH" wrote in message ... | I have a 2007 Add-In workbook that has XML in it to add a Custon Menu Tab in | the Ribbon. How can I ensure that the tab is always placed last in the | Ribbon. For example, Home, Insert, Page Layout, ...., Developer, CUSTOM TAB | HERE. | | Plus, I have noticed that if I save the workbook with a .xls extension the | Ribbon goes back to default settings when activating another workbook and | back to the custom settings I have when the my workbook is reactivated. Why | does it not do that when I have the workbook saved with a .xla extension? | -- | Cheers, | Ryan |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding Menus to the Ribbon
Because this workbook is opened in 2003 as well. 2003 will not recognize the
2007 Add-In. My 2007 Add-In is only used to make changes to the ribbon when 2007 opens it. I have another add-in with 2003 that is used as a reference which contains all the code to manipulate the data in the my workbook name Production Schedule. So when my Production workbook is opened in 2003 the 2003 Add-In is opened to be used as a Reference. When 2007 opens my Production workbook in opens the 2007 Add-In to change the Ribbon and uses 2003 Add-In as a Reference. Are you asking, becuase you have something else in mind? -- Cheers, Ryan "Ron de Bruin" wrote: Why do you want to use it is a add-in ? -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "RyanH" wrote in message ... Thanks for the reply. Since I am using a Add-In workbook is there a way to hide the custom tab when the workbook I want to use the tab in is deactivated and then unhide it when the workbook is activated? If not, I will just make sure to test the workbook I want to use the tab in is the activeworkbook before any of the buttons execute there code. -- Cheers, Ryan "Ron de Bruin" wrote: Hi Ryan Use insertAfterMso <tab id="MyCustomTab" label="My Tab" insertAfterMso="TabDeveloper" Plus, I have noticed that if I save the workbook with a .xls extension the Ribbon goes back to default settings when activating another workbook and back to the custom settings I have when the my workbook is reactivated. Why does it not do that when I have the workbook saved with a .xla extension? That's normal in 2007 A xla is a hidden workbook and the code/menus that is in it you want to use in all open workbooks that is in the xla. In a normal workbook it will load the ribbonX when you activate the workbook and remove your changes when you deactivate it -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "RyanH" wrote in message ... I have a 2007 Add-In workbook that has XML in it to add a Custon Menu Tab in the Ribbon. How can I ensure that the tab is always placed last in the Ribbon. For example, Home, Insert, Page Layout, ...., Developer, CUSTOM TAB HERE. Plus, I have noticed that if I save the workbook with a .xls extension the Ribbon goes back to default settings when activating another workbook and back to the custom settings I have when the my workbook is reactivated. Why does it not do that when I have the workbook saved with a .xla extension? -- Cheers, Ryan |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding Menus to the Ribbon
See this page Ryan
http://www.rondebruin.nl/compatiblemenu.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "RyanH" wrote in message ... Because this workbook is opened in 2003 as well. 2003 will not recognize the 2007 Add-In. My 2007 Add-In is only used to make changes to the ribbon when 2007 opens it. I have another add-in with 2003 that is used as a reference which contains all the code to manipulate the data in the my workbook name Production Schedule. So when my Production workbook is opened in 2003 the 2003 Add-In is opened to be used as a Reference. When 2007 opens my Production workbook in opens the 2007 Add-In to change the Ribbon and uses 2003 Add-In as a Reference. Are you asking, becuase you have something else in mind? -- Cheers, Ryan "Ron de Bruin" wrote: Why do you want to use it is a add-in ? -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "RyanH" wrote in message ... Thanks for the reply. Since I am using a Add-In workbook is there a way to hide the custom tab when the workbook I want to use the tab in is deactivated and then unhide it when the workbook is activated? If not, I will just make sure to test the workbook I want to use the tab in is the activeworkbook before any of the buttons execute there code. -- Cheers, Ryan "Ron de Bruin" wrote: Hi Ryan Use insertAfterMso <tab id="MyCustomTab" label="My Tab" insertAfterMso="TabDeveloper" Plus, I have noticed that if I save the workbook with a .xls extension the Ribbon goes back to default settings when activating another workbook and back to the custom settings I have when the my workbook is reactivated. Why does it not do that when I have the workbook saved with a .xla extension? That's normal in 2007 A xla is a hidden workbook and the code/menus that is in it you want to use in all open workbooks that is in the xla. In a normal workbook it will load the ribbonX when you activate the workbook and remove your changes when you deactivate it -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "RyanH" wrote in message ... I have a 2007 Add-In workbook that has XML in it to add a Custon Menu Tab in the Ribbon. How can I ensure that the tab is always placed last in the Ribbon. For example, Home, Insert, Page Layout, ...., Developer, CUSTOM TAB HERE. Plus, I have noticed that if I save the workbook with a .xls extension the Ribbon goes back to default settings when activating another workbook and back to the custom settings I have when the my workbook is reactivated. Why does it not do that when I have the workbook saved with a .xla extension? -- Cheers, Ryan |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding Menus to the Ribbon
If you leave the insertAfterMso="TabDeveloper" out completely I believe
Excel will place your group last at the time it adds the group. Correct Jim -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Jim Rech" wrote in message ... How can I ensure that the tab is always placed last in the Ribbon. <tab id="MyCustomTab" label="My Tab" insertAfterMso="TabDeveloper" If you leave the insertAfterMso="TabDeveloper" out completely I believe Excel will place your group last at the time it adds the group. The above places the group between the Developer tab but before Add-ins if you have that displayed. I say "at the time it adds the group" because a later loaded workbook or add-in can have its group placed after yours so you cannot force your to always be last. Re changing the tab's visibility at runtime, you should be able to do that by invalidating the ribbon with the workbook activate and deactivate events along with using the getVisible attribute to name a procedure returning the visible state. -- Jim "Ron de Bruin" wrote in message ... | | Hi Ryan | | Use insertAfterMso | | <tab id="MyCustomTab" label="My Tab" insertAfterMso="TabDeveloper" | | | Plus, I have noticed that if I save the workbook with a .xls extension the | Ribbon goes back to default settings when activating another workbook and | back to the custom settings I have when the my workbook is reactivated. Why | does it not do that when I have the workbook saved with a .xla extension? | | That's normal in 2007 | A xla is a hidden workbook and the code/menus that is in it you want to use in all | open workbooks that is in the xla. | | In a normal workbook it will load the ribbonX when you activate the workbook and | remove your changes when you deactivate it | | | | -- | | Regards Ron de Bruin | http://www.rondebruin.nl/tips.htm | | | "RyanH" wrote in message ... | I have a 2007 Add-In workbook that has XML in it to add a Custon Menu Tab in | the Ribbon. How can I ensure that the tab is always placed last in the | Ribbon. For example, Home, Insert, Page Layout, ...., Developer, CUSTOM TAB | HERE. | | Plus, I have noticed that if I save the workbook with a .xls extension the | Ribbon goes back to default settings when activating another workbook and | back to the custom settings I have when the my workbook is reactivated. Why | does it not do that when I have the workbook saved with a .xla extension? | -- | Cheers, | Ryan |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding Menus to the Ribbon
I am very new to XML and afraid I don't know much about it. How would I
change the tabs visiblity attribute when the workbook is activated and deactivated. -- Cheers, Ryan "Jim Rech" wrote: How can I ensure that the tab is always placed last in the Ribbon. <tab id="MyCustomTab" label="My Tab" insertAfterMso="TabDeveloper" If you leave the insertAfterMso="TabDeveloper" out completely I believe Excel will place your group last at the time it adds the group. The above places the group between the Developer tab but before Add-ins if you have that displayed. I say "at the time it adds the group" because a later loaded workbook or add-in can have its group placed after yours so you cannot force your to always be last. Re changing the tab's visibility at runtime, you should be able to do that by invalidating the ribbon with the workbook activate and deactivate events along with using the getVisible attribute to name a procedure returning the visible state. -- Jim "Ron de Bruin" wrote in message ... | | Hi Ryan | | Use insertAfterMso | | <tab id="MyCustomTab" label="My Tab" insertAfterMso="TabDeveloper" | | | Plus, I have noticed that if I save the workbook with a .xls extension the | Ribbon goes back to default settings when activating another workbook and | back to the custom settings I have when the my workbook is reactivated. Why | does it not do that when I have the workbook saved with a .xla extension? | | That's normal in 2007 | A xla is a hidden workbook and the code/menus that is in it you want to use in all | open workbooks that is in the xla. | | In a normal workbook it will load the ribbonX when you activate the workbook and | remove your changes when you deactivate it | | | | -- | | Regards Ron de Bruin | http://www.rondebruin.nl/tips.htm | | | "RyanH" wrote in message ... | I have a 2007 Add-In workbook that has XML in it to add a Custon Menu Tab in | the Ribbon. How can I ensure that the tab is always placed last in the | Ribbon. For example, Home, Insert, Page Layout, ...., Developer, CUSTOM TAB | HERE. | | Plus, I have noticed that if I save the workbook with a .xls extension the | Ribbon goes back to default settings when activating another workbook and | back to the custom settings I have when the my workbook is reactivated. Why | does it not do that when I have the workbook saved with a .xla extension? | -- | Cheers, | Ryan |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding Menus to the Ribbon
How to do this is "beyond the scope of a newsgroup post" I'm afraid. And I
don't have time to do a full-blown example. Can you do as you suggested before - have the called macro make sure the right workbook is active? -- Jim "RyanH" wrote in message ... |I am very new to XML and afraid I don't know much about it. How would I | change the tabs visiblity attribute when the workbook is activated and | deactivated. | -- | Cheers, | Ryan | | | "Jim Rech" wrote: | | How can I ensure that the tab is always placed last in the Ribbon. | <tab id="MyCustomTab" label="My Tab" insertAfterMso="TabDeveloper" | | If you leave the insertAfterMso="TabDeveloper" out completely I believe | Excel will place your group last at the time it adds the group. The above | places the group between the Developer tab but before Add-ins if you have | that displayed. I say "at the time it adds the group" because a later | loaded workbook or add-in can have its group placed after yours so you | cannot force your to always be last. | | Re changing the tab's visibility at runtime, you should be able to do that | by invalidating the ribbon with the workbook activate and deactivate events | along with using the getVisible attribute to name a procedure returning the | visible state. | | -- | Jim | "Ron de Bruin" wrote in message | ... | | | | Hi Ryan | | | | Use insertAfterMso | | | | <tab id="MyCustomTab" label="My Tab" insertAfterMso="TabDeveloper" | | | | | | Plus, I have noticed that if I save the workbook with a .xls extension | the | | Ribbon goes back to default settings when activating another workbook | and | | back to the custom settings I have when the my workbook is reactivated. | Why | | does it not do that when I have the workbook saved with a .xla | extension? | | | | That's normal in 2007 | | A xla is a hidden workbook and the code/menus that is in it you want to | use in all | | open workbooks that is in the xla. | | | | In a normal workbook it will load the ribbonX when you activate the | workbook and | | remove your changes when you deactivate it | | | | | | | | -- | | | | Regards Ron de Bruin | | http://www.rondebruin.nl/tips.htm | | | | | | "RyanH" wrote in message | ... | | I have a 2007 Add-In workbook that has XML in it to add a Custon Menu Tab | in | | the Ribbon. How can I ensure that the tab is always placed last in the | | Ribbon. For example, Home, Insert, Page Layout, ...., Developer, CUSTOM | TAB | | HERE. | | | | Plus, I have noticed that if I save the workbook with a .xls extension | the | | Ribbon goes back to default settings when activating another workbook | and | | back to the custom settings I have when the my workbook is reactivated. | Why | | does it not do that when I have the workbook saved with a .xla | extension? | | -- | | Cheers, | | Ryan | | |
#11
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding Menus to the Ribbon
For the OP
In example 3 on this page there is a example to hide a group if you open another workbook http://www.rondebruin.nl/compatiblemenu.htm Maybe this will give you a idea -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Jim Rech" wrote in message ... How to do this is "beyond the scope of a newsgroup post" I'm afraid. And I don't have time to do a full-blown example. Can you do as you suggested before - have the called macro make sure the right workbook is active? -- Jim "RyanH" wrote in message ... |I am very new to XML and afraid I don't know much about it. How would I | change the tabs visiblity attribute when the workbook is activated and | deactivated. | -- | Cheers, | Ryan | | | "Jim Rech" wrote: | | How can I ensure that the tab is always placed last in the Ribbon. | <tab id="MyCustomTab" label="My Tab" insertAfterMso="TabDeveloper" | | If you leave the insertAfterMso="TabDeveloper" out completely I believe | Excel will place your group last at the time it adds the group. The above | places the group between the Developer tab but before Add-ins if you have | that displayed. I say "at the time it adds the group" because a later | loaded workbook or add-in can have its group placed after yours so you | cannot force your to always be last. | | Re changing the tab's visibility at runtime, you should be able to do that | by invalidating the ribbon with the workbook activate and deactivate events | along with using the getVisible attribute to name a procedure returning the | visible state. | | -- | Jim | "Ron de Bruin" wrote in message | ... | | | | Hi Ryan | | | | Use insertAfterMso | | | | <tab id="MyCustomTab" label="My Tab" insertAfterMso="TabDeveloper" | | | | | | Plus, I have noticed that if I save the workbook with a .xls extension | the | | Ribbon goes back to default settings when activating another workbook | and | | back to the custom settings I have when the my workbook is reactivated. | Why | | does it not do that when I have the workbook saved with a .xla | extension? | | | | That's normal in 2007 | | A xla is a hidden workbook and the code/menus that is in it you want to | use in all | | open workbooks that is in the xla. | | | | In a normal workbook it will load the ribbonX when you activate the | workbook and | | remove your changes when you deactivate it | | | | | | | | -- | | | | Regards Ron de Bruin | | http://www.rondebruin.nl/tips.htm | | | | | | "RyanH" wrote in message | ... | | I have a 2007 Add-In workbook that has XML in it to add a Custon Menu Tab | in | | the Ribbon. How can I ensure that the tab is always placed last in the | | Ribbon. For example, Home, Insert, Page Layout, ...., Developer, CUSTOM | TAB | | HERE. | | | | Plus, I have noticed that if I save the workbook with a .xls extension | the | | Ribbon goes back to default settings when activating another workbook | and | | back to the custom settings I have when the my workbook is reactivated. | Why | | does it not do that when I have the workbook saved with a .xla | extension? | | -- | | Cheers, | | Ryan | | |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
ribbon into tool bard and drop down menus | Excel Discussion (Misc queries) | |||
Custom menus don't appear under custom ribbon tab | Excel Programming | |||
Ribbon vs. Menus | Excel Discussion (Misc queries) | |||
Adding dropdown menus? | Excel Discussion (Misc queries) | |||
Adding menus! | Excel Programming |