How to hide built in ribbons (1 Viewer)

smig

Registered User.
Local time
Today, 14:02
Joined
Nov 25, 2009
Messages
2,209
I made my oun menus in AC2003 and converted the file into AC2010 format.
I much prefer the old menu style over the new ribbon.
When I open the file I see the old menu in the Add-Ins ribbon, but the File and Home ribbons are also open.
How do I hide all the built in ribbons and keeping only the Add-Ins one open?
Can't find any reference to the ribbons collection :mad:

Thank you,
Tal
 

Rooter1988

New member
Local time
Today, 04:02
Joined
Sep 14, 2015
Messages
8
Not sure i understand but maybe this helps.Options-->Customize Ribbon-->Right side-->Uncheck/Check what you need-->Ok.
 

smig

Registered User.
Local time
Today, 14:02
Joined
Nov 25, 2009
Messages
2,209
I need to hide them in VBA code
 

Rooter1988

New member
Local time
Today, 04:02
Joined
Sep 14, 2015
Messages
8
This may help you to go in the right direction,

stackoverflow.com/questions/18240240/msaccess-minimize-the-toolbar-ribbon-onload
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 19:02
Joined
May 7, 2009
Messages
19,233
the other tabs on the ribbon can be removed, but the File menu cannot.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 19:02
Joined
May 7, 2009
Messages
19,233
you need to create a custom ribbon.
there are many steps, like creating uSysRibbon table with fields RibbonName (shorttext), RibbonXML (longtext). to make it short download IBDE creator. play with it on temporary database, see what you will discover. there is a shareware and paid version.

or you can try on your temporary database:

DoCmd.ShowToolbar "Ribbon", acToolbarNo

but you have to reset it on before closing your db

DoCmd.ShowToolbar "Ribbon", acToolbarYes
 
Last edited:

smig

Registered User.
Local time
Today, 14:02
Joined
Nov 25, 2009
Messages
2,209
If I hide the ribbon it will hide the Add-Ins tab too. Not what I want.
Creating a custom ribbon won't help too. I want the old menu system that are in the Add-Ins one.

I can live with the File Tab open. How do I hide the Home one ?
 
Last edited:

smig

Registered User.
Local time
Today, 14:02
Joined
Nov 25, 2009
Messages
2,209
This XML should work to Hide the Home Tab
This is all I'm asking. How hard can it be :(
Code:
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
    <ribbon>
        <tabs>
            <tab idMso="TabHome" visible="false" />
        </tabs>
    </ribbon>
</customUI>
How do I run XML code from VBA ?
Also, what is the correct name of this Tab. Is it TabHome, TabHomeAccess or TabAccessHome ?

Stupid MS with their XML ribbons :banghead:
 
Last edited:

Ari

Registered User.
Local time
Today, 04:02
Joined
Oct 22, 2011
Messages
139

smig

Registered User.
Local time
Today, 14:02
Joined
Nov 25, 2009
Messages
2,209
Hi

In the Access Options> Current Database> uncheck:

- Allow full menus
- Allow internal toolbar
You still get stuck with the File and Home ribbons together with the Add-Ins one that hold the old menus.
 

smig

Registered User.
Local time
Today, 14:02
Joined
Nov 25, 2009
Messages
2,209
I feel I go nowhere here :Crying:
Can someone please direct me to the correct way by giving me a short XML file that will hide the Home tab, and a short code to read that XML file ?

Thank you
 

speakers_86

Registered User.
Local time
Today, 07:02
Joined
May 17, 2007
Messages
1,919
You can use the LoadCustomUI method to load the xml file from a string, and then you simply set the database property to set the ribbon. I believe the property name is RibbonName stored as text. The first time you set the property, a restart of Access is required. I don't think the file button in 2010 and up will go away. Setting AllowFullMenus to false will disable all of the options there though. If you want furhter modifications, you need to manipulate the backstage via xml.
 

Ari

Registered User.
Local time
Today, 04:02
Joined
Oct 22, 2011
Messages
139
Hi

To have the Menu outside the Add-ins guide, you will have to keep the file in the format 2000-2003 (MDB). Here is an example of the MDB file (2003) and see the menu outside the Add-ins guide.

Note: in 2013 and 2016 will be trapped in add-in guide.

Use both indicated site to learn how to mount your ribbons.
 

Attachments

  • smig.zip
    26.4 KB · Views: 165

smig

Registered User.
Local time
Today, 14:02
Joined
Nov 25, 2009
Messages
2,209
Hi

To have the Menu outside the Add-ins guide, you will have to keep the file in the format 2000-2003 (MDB). Here is an example of the MDB file (2003) and see the menu outside the Add-ins guide.

Note: in 2013 and 2016 will be trapped in add-in guide.

Use both indicated site to learn how to mount your ribbons.

I know how to create menu in MDB file.
Problem is I want to move to ACCDB file still keeping the old menus system.

PROBLEMS:
  • Can't find a way to hide the HomeTab
  • If I recrate all my menus from scratch and move to Ribbons, is there a way to hide part of the menu, based on the user opened the App ? ie, Can I hide part of it after loading ?


The new Ribbons system is so unfriendly with Access :banghead::banghead::banghead:
 

speakers_86

Registered User.
Local time
Today, 07:02
Joined
May 17, 2007
Messages
1,919
Its hardly new! What are you trying to hide, and when should that happen? Most objects have a getVisible property.

edit- If you are only trying to hide the home tab, you posted the xml for that yourself. I'm confuses as to what exactly you are having trouble with.
 

smig

Registered User.
Local time
Today, 14:02
Joined
Nov 25, 2009
Messages
2,209
I can't find a way to hide the homeTab.
Could you ?

Now for the other question:
If I create the menus from scratch using the ribbons system is there a way to hide only 1 button or menu ?
 

speakers_86

Registered User.
Local time
Today, 07:02
Joined
May 17, 2007
Messages
1,919
I think so. The xml code you posted should work. Worst case scenario you can startFromScratch=true. You can hide buttons, menus, and tabs. Just use the getVisible callback. I can test it when I get home. This computer wont let me use custom UIs.
 

Users who are viewing this thread

Top Bottom