Remove Menus and Toolbars

Newbie2001

New member
Local time
Yesterday, 20:35
Joined
Dec 6, 2011
Messages
6
A very SEASONED Access programmer here ... :) . Since March 2011!

I want to make my DB look more stand-alone-ish. Found ghudson's (VBA) post on this site:

' This will hide all menu bars and tool bars
Dim i As Integer
For i = 1 To CommandBars.Count
CommandBars(i).Enabled = False
Next i

OUTSTANDING. If I'm running MSA 2003 it's like Access isn't even there (after a brief screen flash). However, when I try the software in MSA 2010 .. the Menus/Toolbars remain. Suggestions and hand-holding would be appreciated. In advance, 'Thank you .. Thank you very much' (ELVIS).
 
Well Elvis, pleased to have you hear :D

Access 2010 doesn't use menubars and toolbars. It uses ribbons. You will need to learn more about ribbons before you try hiding it.

Here are some resources:

http://www.accessribbon.de/en/
http://www.ribbon01.com/

Re your OP, to hide the ribbon you can use:

http://msdn.microsoft.com/en-us/library/bb258192(v=office.12).aspx

If you actually mean hiding a ribbon in the Add-Ins tab on the ribbon, then this:
Code:
DoCmd.ShowToolbar “Ribbon”, acToolbarNo

DoCmd.ShowToolbar “Ribbon”, acToolbarYes
 
vbaInet ... thank you for your response ... but, well ... maybe just too novice to get anything to work. In MA2003 I get, on my opening screen ...

a blue bar across the top with nothing but MY icon and caption (no indication that MS Access is even there)

and in MA 2010 I get ...

a full ribbon showing that they're running in MS Access and giving them options

and I can't get that &^*(%$^ ribbon to disappear. Am I fighting a losing battle? I did add your

DoCmd.ShowToolbar “Ribbon”, acToolbarNo

and I get that it can't find the name 'Ribbon'.

Additional suggestions appreciated.
 
Sorry I meant "to hide a toolbar in the Add-Ins tab on the ribbon ...". I type quite fast so never get time to re-read :)

You're not fightin a loosing battle, but like I said you need to understand how to program the ribbon. It is what is mentioned here that would solve your problem:
Access 2010 doesn't use menubars and toolbars. It uses ribbons. You will need to learn more about ribbons before you try hiding it.

Here are some resources:

http://www.accessribbon.de/en/
http://www.ribbon01.com/

Re your OP, to hide the ribbon you can use:

http://msdn.microsoft.com/en-us/library/bb258192(v=office.12).aspx
 
vbaInet .. thanks again .. for the clarification

Now, perhaps MY turn to clarify.

The original script from ghudson (from this site) that I posted ...

' This will hide all menu bars and tool bars
Dim i As Integer
For i = 1 To CommandBars.Count
CommandBars(i).Enabled = False
Next i

.. runs from VBA and in MSA2003 ... totally clears the Access window. Wouldn't even know Access was in the background.

The DB I'm writing will, eventually, be sold commercially ... DL'd from my web-site ... so, although the link you gave does indeed instruct an end user on how to set up their own customized ribbon or to hide a ribbon ... it's just not appropriate for all the end users who will be using my software. I just liked the ghudson lines for improving the appearance of MY software ... and hoped something .. totally transparent to the end user .. might have been available for MSA2007-2010 etc. Don't really think I want to send them instructions on how to change Access to look better ... I wanted to do it, behind the scenes ... as it were. But again, thank you so much. Just another notch in my 'learning experience' trials with Access!

Newbie2001 ( btw, I type too fast too ... I had originally intended to be Newbie2011 :) )
 
This is not the first time this question this question has been asked so what I told is what any other expert on here will tell you.

It does not instruct an end user how to create a ribbon. It tells you as a developer how to create the ribbon to suit the needs of your clients or customers.

The third link however, gives you step-by-step instructions how to hide the ribbon. I know ghudson (who's also an AWF VIP) and his code will not work in Access 2007 and 2010 because it was written for pre Access 2007. Ribbons and Toolbars work independent of each other. Ribbons are based on XML whereas toolbars aren't.
 

Users who are viewing this thread

Back
Top Bottom