Solved

Excel 2010 amend file Tab ribbon

Posted on 2012-04-11
5
1,159 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 500 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Microsoft Office Picture Manager is not included in Office 2013. This comes as a shock to users upgrading from earlier versions of Office, such as 2007 and 2010, where Picture Manager was included as a standard application. This article explains how…
In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

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