Modifying ribbon tabs?

Shinning

New Member
Joined
Apr 17, 2015
Messages
17
Hello,

I have the following HTML code in Custom UI editor:

Code:
<customUI ******="Sheet1.Ribbon******" xmlns="http://schemas.microsoft.com/office/2006/01/customui">
	<ribbon>
		<tabs>
			<tab idMso="TabHome" getVisible="Sheet1.GetVisible"  />
			<tab idMso="TabReview" getVisible="Sheet1.GetVisible" />
			<tab idMso="TabInsert" getVisible="Sheet1.GetVisible" />
			<tab idMso="Formulas" getVisible="Sheet1.GetVisible" />
		</tabs>
	</ribbon>
</customUI>


***********Mr. Excel.com: Why is my HTML code not showing?

In my Excel spreadsheet I have the following code in Sheet1:


Code:
Option Explicit

Dim Rib As IRibbonUI
Public myId As String

'Callback for customUI.******
Sub Ribbon******(ribbon As IRibbonUI)
    Set Rib = ribbon
    Rib.Invalidate   ' Invalidates Rib object
End Sub

Sub GetVisible(control As IRibbonControl, ByRef visible)
visible = False
End Sub


I think the above runs as follows:

As the spreadsheet is opened, the Home, review and insert tabs are hidden by setting Visible to false.
However, the formulas tab is still visible???

Can someone point out as to what I am doing wrong ?

Al I want to do is hide all the tabs except one tab which is my custom one.


Thanks all
Rn
 
Last edited:

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

Forum statistics

Threads
1,203,323
Messages
6,054,728
Members
444,747
Latest member
Jaborsum

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top