Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Excel 2010 amend file Tab ribbon

Posted on 2012-04-11
5
Medium Priority
?
1,249 Views
Last Modified: 2012-04-12
Hi Experts

I have a spreadhsheet which I have created a custom ribbon tab - using the custom UI editor, I have disabled all other ribbon tabs, but the file tab  is still present and active - im guessing this is mandatory - is there a way I can use VBA or the custom UI to edit what commands are in the file tab, I dont want the save or open command avaiable.
0
Comment
Question by:MrDavidThorn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 42

Expert Comment

by:dlmille
ID: 37834852
You are correct.  The FILE tab is like the old Office button.

However, Ron's got some good times to handle exactly what you need, re: backstage:

http://www.rondebruin.nl/backstage.htm

Dave
0
 

Author Comment

by:MrDavidThorn
ID: 37836202
Thanks,

I have 'pinched'  some of the backstage code XML however I dont know where to put it on my exsisting code - the below isnt working

<customUI onLoad="RibbonOnLoad"  xmlns="http://schemas.microsoft.com/office/2006/01/customui">

  <ribbon startFromScratch="true">
    <tabs>
      <backstage>
                         <button idMso="FileSave" visible="false"/>
                 </backstage>

      <tab id="MyCustomTab" label="Investec Nav" insertAfterMso="TabHome" getVisible="GetVisible" tag="rNAV">
                        
          <group id="customGroup1" label="Tracker">
          <button id="customButton1" label="Add/Update Fund Benchmark" size="large" onAction="psLoadBenchMark" imageMso="AdpDiagramIndexesKeys" />            
        </group>

      </tab>
    </tabs>
  </ribbon>
0
 
LVL 42

Expert Comment

by:dlmille
ID: 37836220
Upload your workbook, non-sensitive data, of course.  All I need is your workbook with code and I can help more effectively.

Dave
0
 
LVL 42

Accepted Solution

by:
dlmille earned 2000 total points
ID: 37836368
Here's your XML with the menu item you want, and also the backstage with no file open or save options - I included all the backstage with true/false settings, rather than just omitting those we don't want to deal with.

I took out the GetVisible syntax, so we can focus on what your original question was addressing, and that would require me to add a bunch of code, so trying to stay in scope with your request.  Next time, it would be useful for you to provide a template of your workbook with the code you already have to work with and thanks for that!

Also, note, I used the Excel 2010 schema, as your question appeared to be focused on that, though your schema was for 2007.  Also, note, the BackStage view is only for Excel 2010.

<customUI onLoad="RibbonOnLoad" xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon startFromScratch="true">
	<tabs>		
		<tab id="MyCustomTab" label="Investec Nav" insertAfterMso="TabHome">		
		
			<group id="customGroup1" label="Tracker">		
				<button id="customButton1" label="Add/Update Fund Benchmark" onAction="plsLoadBenchmark" imageMso="AdpDiagramIndexesKeys" size= "large"/>	
			</group>		
		
		</tab>		
	</tabs>		
</ribbon>
    <backstage>	
        <button idMso="FileSave" visible="false"/>	
        <button idMso="FileSaveAs" visible="false"/>	
        <button idMso="FileOpen" visible="false"/>	
        <button idMso="FileClose" visible="true"/>	
        <button idMso="ApplicationOptionsDialog" visible="true"/>	
        <button idMso="FileExit" visible="true"/>	
        <tab idMso="TabInfo" visible="true"/>	
        <tab idMso="TabRecent" visible="false"/>	
        <tab idMso="TabNew" visible="true"/>	
        <tab idMso="TabPrint" visible="true"/>	
        <tab idMso="TabShare" visible="false"/>	
        <tab idMso="TabHelp" visible="true"/>	
    </backstage>	
</customUI>	

Open in new window


I've attached a same file to demonstrate it works.

Cheers,

Dave
Book1.xlsm
0
 

Author Comment

by:MrDavidThorn
ID: 37837056
Brilliant! - thank you very much
0

Featured Post

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
Microsoft has changed the look and feel of Azure AD and Microsoft account sign-in pages so that you will have a more unified look and feel when moving between the two interfaces.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question