Date: Wed, 19 Jun 2013 08:42:16 +0200
Quote:
- Nick Hodge's Excel Blog - Comments
re: Ribbon, Step-by-Step. Part 3 (The Office Menu and Re-purposing)
http://excelusergroup.org/blogs/nickhodge/archive/2008/02/03/ribbon-step-by-step-part-3-the-office-menu-and-re-purposing.aspx#3767
Text:
Jesse
The startFromScratch="True" will take away everything except New, Open and Save. Of course, if it is a new workbook you will get Save as, by pressing Save. However, to put it back in you just roll a custom button and write your own VBA code to Save As. The RibbonX looks like this
<customUI xmlns="">schemas.microsoft.com/.../customui">
<ribbon startFromScratch="true">
<officeMenu>
<button id="btnSaveAs" insertBeforeMso="FilePrintPreview" imageMso="FileSaveAs" label="Save As" description="Save as" onAction="mySaveAs"/>
</officeMenu>
</ribbon>
</customUI>
and the VBA code, (IN A STANDARD MODULE), looks like this. (There is no error code here to decide if dialog was cancelled and nothing to default to say xlsx, but all that can be done very easily)
'Callback for btnSaveAs onAction
Sub mySaveAs(control As IRibbonControl)
Dim strFName As String
strFName = Application.GetSaveAsFilename
ThisWorkbook.SaveAs Filename:=strFName
End Sub
Via FeedShow.com