I have the following XML in a Custom Ribbon I have created
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" ******="RibbonControl******">
<ribbon>
<tabs>
<tab id="tBreakdowns" label="Breakdowns">
<group id="gCustGrp1" label="Breakdowns" >
<button id="bSummary" size="large" label="Summary" imageMso="BlogHomePage"
screentip = "Summary" onAction="CallSummary"
supertip = "Displays the Summary information on the Copy Ready Worksheet"/>
<button id="bFloor" size="large" label="Floor" imageMso="AlignJustify"
screentip = "Floor" onAction="CallFloor"
supertip = "Displays the Floor information on the Copy Ready Worksheet"/>
<button id="bDrawing" size="large" label="Drawing" imageMso="BlogCategories"
screentip = "Drawing" onAction="CallDrawing"
supertip = "Displays the Drawing information on the Copy Ready Worksheet"/>
<button id="bZone" size="large" label="Zone" imageMso="AlignJustifyHigh"
screentip = "Zone" onAction="CallZone"
supertip = "Displays the Zone information on the Copy Ready Worksheet"/>
</group>
<group id="gCustGrp2" label="Import Data" tag="AdminGroup" >
<button id="bChooseImportFile" size="large" label="Choose Import File" imageMso="BlogPublish"
screentip = "Choose the file you need to import"
supertip = "Runs the Choose File macro" onAction="CallChooseFile"/>
<button id="bImportData" size="large" label="Import Data" imageMso="CollapseAll"
screentip = "Import Data" onAction="CallImportRawData"
supertip = "Runs the Import Data macro"/>
<button id="bHidAndSave" size="large" label="Hide Input Save As" imageMso="FileSave"
screentip = "Hide Input tab and Save As" onAction="CallImportRawData"
supertip = "Runs the Import Data macro"/>
</group>
<group id="AlternateBaseFilter" label="Base" >
<button id= "AlternateBase" label = "Alternate" size="large"
onAction="ShowBaseAlternateUserForm" screentip = "Toggles Alternate Values" imageMso="BlackAndWhiteInverseGrayscale"
supertip = "Switches Alternate field values between Alernate and Base" />
</group>
<group id="gInfo" label="Info" >
<button id= "bInfo" label = "Info" size="large"
onAction="ShowInfoForm" screentip = "Information" imageMso="Info"
supertip = "Show information about this file." />
</group>
</tab>
<tab id="tBreakdowns2" label="Breakdowns2">
<group id="gCustGrp3" label="Breakdowns2" >
<button id="bSummary2" size="large" label="Summary" imageMso="BlogHomePage"
screentip = "Summary" onAction="CallSummary"
supertip = "Displays the Summary information on the Copy Ready Worksheet"/>
<button id="bFloor2" size="large" label="Floor" imageMso="AlignJustify"
screentip = "Floor" onAction="CallFloor"
supertip = "Displays the Floor information on the Copy Ready Worksheet"/>
<button id="bDrawing2" size="large" label="Drawing" imageMso="BlogCategories"
screentip = "Drawing" onAction="CallDrawing"
supertip = "Displays the Drawing information on the Copy Ready Worksheet"/>
<button id="bZone2" size="large" label="Zone" imageMso="AlignJustifyHigh"
screentip = "Zone" onAction="CallZone"
supertip = "Displays the Zone information on the Copy Ready Worksheet"/>
</group>
<group id="AlternateBaseFilter2" label="Base" >
<button id= "AlternateBase2" label = "Alternate" size="large"
onAction="ShowBaseAlternateUserForm" screentip = "Toggles Alternate Values" imageMso="BlackAndWhiteInverseGrayscale"
supertip = "Switches Alternate field values between Alernate and Base" />
</group>
<group id="gInfo2" label="Info" >
<button id= "bInfo2" label = "Info" size="large"
onAction="ShowInfoForm" screentip = "Information" imageMso="Info"
supertip = "Show information about this file." />
</group>
</tab>
</tabs>
</ribbon>
</customUI>
When the HideInputSaveAs button is selected I want to hide the Choose Input File, Import File buttons or just show the Breakdowns2 Ribbon.
I have spent the last day and a half really learning a lot of great things on this but I have yet to find something that works.
I have even tried this:
It will not work.
Any help is always greatly appreciated!
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" ******="RibbonControl******">
<ribbon>
<tabs>
<tab id="tBreakdowns" label="Breakdowns">
<group id="gCustGrp1" label="Breakdowns" >
<button id="bSummary" size="large" label="Summary" imageMso="BlogHomePage"
screentip = "Summary" onAction="CallSummary"
supertip = "Displays the Summary information on the Copy Ready Worksheet"/>
<button id="bFloor" size="large" label="Floor" imageMso="AlignJustify"
screentip = "Floor" onAction="CallFloor"
supertip = "Displays the Floor information on the Copy Ready Worksheet"/>
<button id="bDrawing" size="large" label="Drawing" imageMso="BlogCategories"
screentip = "Drawing" onAction="CallDrawing"
supertip = "Displays the Drawing information on the Copy Ready Worksheet"/>
<button id="bZone" size="large" label="Zone" imageMso="AlignJustifyHigh"
screentip = "Zone" onAction="CallZone"
supertip = "Displays the Zone information on the Copy Ready Worksheet"/>
</group>
<group id="gCustGrp2" label="Import Data" tag="AdminGroup" >
<button id="bChooseImportFile" size="large" label="Choose Import File" imageMso="BlogPublish"
screentip = "Choose the file you need to import"
supertip = "Runs the Choose File macro" onAction="CallChooseFile"/>
<button id="bImportData" size="large" label="Import Data" imageMso="CollapseAll"
screentip = "Import Data" onAction="CallImportRawData"
supertip = "Runs the Import Data macro"/>
<button id="bHidAndSave" size="large" label="Hide Input Save As" imageMso="FileSave"
screentip = "Hide Input tab and Save As" onAction="CallImportRawData"
supertip = "Runs the Import Data macro"/>
</group>
<group id="AlternateBaseFilter" label="Base" >
<button id= "AlternateBase" label = "Alternate" size="large"
onAction="ShowBaseAlternateUserForm" screentip = "Toggles Alternate Values" imageMso="BlackAndWhiteInverseGrayscale"
supertip = "Switches Alternate field values between Alernate and Base" />
</group>
<group id="gInfo" label="Info" >
<button id= "bInfo" label = "Info" size="large"
onAction="ShowInfoForm" screentip = "Information" imageMso="Info"
supertip = "Show information about this file." />
</group>
</tab>
<tab id="tBreakdowns2" label="Breakdowns2">
<group id="gCustGrp3" label="Breakdowns2" >
<button id="bSummary2" size="large" label="Summary" imageMso="BlogHomePage"
screentip = "Summary" onAction="CallSummary"
supertip = "Displays the Summary information on the Copy Ready Worksheet"/>
<button id="bFloor2" size="large" label="Floor" imageMso="AlignJustify"
screentip = "Floor" onAction="CallFloor"
supertip = "Displays the Floor information on the Copy Ready Worksheet"/>
<button id="bDrawing2" size="large" label="Drawing" imageMso="BlogCategories"
screentip = "Drawing" onAction="CallDrawing"
supertip = "Displays the Drawing information on the Copy Ready Worksheet"/>
<button id="bZone2" size="large" label="Zone" imageMso="AlignJustifyHigh"
screentip = "Zone" onAction="CallZone"
supertip = "Displays the Zone information on the Copy Ready Worksheet"/>
</group>
<group id="AlternateBaseFilter2" label="Base" >
<button id= "AlternateBase2" label = "Alternate" size="large"
onAction="ShowBaseAlternateUserForm" screentip = "Toggles Alternate Values" imageMso="BlackAndWhiteInverseGrayscale"
supertip = "Switches Alternate field values between Alernate and Base" />
</group>
<group id="gInfo2" label="Info" >
<button id= "bInfo2" label = "Info" size="large"
onAction="ShowInfoForm" screentip = "Information" imageMso="Info"
supertip = "Show information about this file." />
</group>
</tab>
</tabs>
</ribbon>
</customUI>
When the HideInputSaveAs button is selected I want to hide the Choose Input File, Import File buttons or just show the Breakdowns2 Ribbon.
I have spent the last day and a half really learning a lot of great things on this but I have yet to find something that works.
I have even tried this:
Code:
Sub hide_ribbon()
Application.ExecuteExcel4Macro "show.toolbar(""Breakdowns"", False)"
End Sub
It will not work.
Any help is always greatly appreciated!
Last edited: