I wanted my Access program to look like standalone and I got rid of all menus from customize. I was still seeing ribbon and office icon, where I would revert that back. Then I found this awesome answer to hide ribbon (including all menu) Disabling the Ribbon Bar Except for Reports (Print Preview) In MS-Access
So, I used
DoCmd.ShowToolbar "Ribbon", acToolbarNo
Then comes new problem
Now I cannot modify anything, design and more codes. How do I revert back?
Thanks
Edit: I know, DoCmd.ShowToolbar "Ribbon", acToolbarYes may be way to go, but I cannot access VBA too.
Ananta
Hold the shift key while you open the database, then press alt+F11 and see if that gets the code window.
Related
I am hoping someone can give me the VBA code in access 2019 to show the Custom Quick Access Toolbar and hide RIBBON (Hide File, home, create, .... )
In my research I have seen code to hide the main menu/ribbon, and which also hides the custom QAT:
DoCmd.RunCommand acCmdWindowHide
DoCmd.ShowToolbar "Ribbon", acToolbarNo
However, I want to keep the QAT and only hide the main menu/ribbon.
Using an .xlam project with a fully working custom ribbon, I have found that the new tab will sometimes show nothing when clicked on. It is intermittent. The global RibbonUI object is available and running an .invalidate will then show the ribbon. However, the .invlalidate attempts prior to the tab being viewed do not seem to change this behavior. I have to view the tab and then run the .invalidate manually (with a macro button) to see the ribbon appear.
I am scratching my head trying to find a slick way of making this new custom tab populate 100% of the time.
For the benefit of those that come across this issue, I have found the root cause and a solution. This is Excel O365 specific.
If you have a custom ribbon tab set up and working, try this. Open Excel, create a blank workbook, then double-click on a cell to put it in "edit mode". Click on your custom ribbon tab. Blank, right?
This "cell in edit mode" is what was causing Excel O365 to fail to show my custom ribbon. Excel O365 starts up on the "File" screen. Prior versions always opened to a blank sheet. If you click on "Blank workbook", the ribbon displays fine. If you DOUBLE-CLICK on "Blank workbook", the first click opens the workbook and the second click puts a cell into ""edit mode". In this state, clicking on your custom ribbon tab shows nothing.
The work-around
Private Sub WorkbookActivate(ByVal Wb As Workbook)
Application.SendKeys "{ESC}"
...
You may see a cell go into edit mode for one blink but it then exits edit mode. Click on your custom ribbon tab. It will now show the ribbon controls as designed.
I'm using the visual designer and have one custom ribbon with 12 or so buttons on it. I'd like to add the most important button from that ribbon onto "TabMail" so that I can use it more easily.
I have added another ribbon via the "add..." dialog, then ribbon, and then add a test button to it. When I then run the solution (from Visual Studio, debug or release) it seems to pick one ribbon or another to show - either leaving me missing a button, or missing 12!
What am I doing wrong?
I've just found that what I should be using is two Tabs, not two Ribbons. Each tab can appear wherever you want, rather than each having to come up as a separate custom tab.
Here's the setup inside visual studio:
Shown below is "My Button" in blue, and in red is "My Tab"
I had a custom ribbon tab installed in MS Word (the tab works for MS Office 2007 and up). I want to remove this tab, but I cannot determine how to do that. I've looked through the "add a custom ribbon tab" answers and they did not help. I know the tab was created with VBA. I do not have the code that created the tab, it was installed with some sort of installer file, which I do not possess.
Any ideas as to how I can remove this ribbon tab? thank you.
Right click on the ribbon and select Customize the Ribbon
Find the name of the tab you want to remove on the right and uncheck it
Click OK
You can do this by downloading the CustomUIEditor from here: https://www.rondebruin.nl/win/winfiles/OfficeCustomUIEditorSetup.zip
This allows you to edit the XML within your ribbon and remove the tab you don't want. Just make a backup of any files you edit as it's quite easy to break stuff
I'm looking to automate a simple process in VBA and need to "click" a ribbon button. It makes the most sense to just call the button's underlying method. Is there a way to figure out what it is?
We are using Excel 2007 and 2010.
If it's Excel 2003 or earlier, you can use the CommandbarControl.Execute method. For instance:
Application.Commandbars("3rd Party Toolbar").Controls("Button to Push").Execute
There are two ways you can do this.
Right click on the toolbar and select Customise. If you right click on the button there may be details somewhere of what Macro the button is associated with.
If you record a macro and click the button. Then you can look at the VBA workspace and view the code that is generated to run your macro (which is just clicking the button you want). This will show you what method the macro clicks.