chestera
asked on
Access 2010 Macro
Hi
Still learning to use Access 2010 no problem with 2003.
Macros
I want to add two lines to a 2010 Macro RunCode and HideRibbon(). I have added the line HideRibbon() but can't seem to be able to edit and Add the line RunCode.
Any help appreciated
chestera
Still learning to use Access 2010 no problem with 2003.
Macros
I want to add two lines to a 2010 Macro RunCode and HideRibbon(). I have added the line HideRibbon() but can't seem to be able to edit and Add the line RunCode.
Any help appreciated
chestera
ASKER
mbizup
I have been doing some research and have bypassed the autoexec and put the following code in my startup form
docmd.showtoolbar "Ribbon", acToolbarNo. this works fine and is simple.
Alan
I have been doing some research and have bypassed the autoexec and put the following code in my startup form
docmd.showtoolbar "Ribbon", acToolbarNo. this works fine and is simple.
Alan
VBA is my own preferred approach over Macros. Glad you've got it worked out.
Curious what was going wrong with your macro though... it *should* work. The general approach is to have a public function:
And then add a RunCode line to your autoExec Macro to call that function.
You do need the custom public function, since HideRibbon is not a native command, and it does need to be a function (not a sub).
Curious what was going wrong with your macro though... it *should* work. The general approach is to have a public function:
Public Function HideRibbon()
docmd.showtoolbar "Ribbon", acToolbarNo
End Function
And then add a RunCode line to your autoExec Macro to call that function.
You do need the custom public function, since HideRibbon is not a native command, and it does need to be a function (not a sub).
ASKER
mbizup
My problem with the Macro I initially entered the Function call HideRibbon() but the I realized I hadn't enter the RunCode line and I didn't know how to add the line. Is there away to remove the Home Ribbon Menu when running the mde or aade rather than hide I have the old access2003 dropdown menu's and hidding the Home Ribbon leaves a large gap
Alan
My problem with the Macro I initially entered the Function call HideRibbon() but the I realized I hadn't enter the RunCode line and I didn't know how to add the line. Is there away to remove the Home Ribbon Menu when running the mde or aade rather than hide I have the old access2003 dropdown menu's and hidding the Home Ribbon leaves a large gap
Alan
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
mbizup
Thank you very much for all your help most appreciated
Alan
Thank you very much for all your help most appreciated
Alan
Here is a sample that you can dig into - an incomplete invoicing database, with a partially complete custom ribbon.
The main things to look into
- Table: USysRibbons --- You might need to set your copy of Access to show system objects to see this table
- modRibbons -- Module of VBA callback functions that affect the ribbon
- Code in the various forms (Open Events, if I remember correctly) that call those functions
DatabaseDevelopment.accdb
The main things to look into
- Table: USysRibbons --- You might need to set your copy of Access to show system objects to see this table
- modRibbons -- Module of VBA callback functions that affect the ribbon
- Code in the various forms (Open Events, if I remember correctly) that call those functions
DatabaseDevelopment.accdb
ASKER
mbizup
Thank you. I now have a wealth of info
All the best
Alan
Thank you. I now have a wealth of info
All the best
Alan
RunCode is definitely an option in Access 2010 accdb/mdb file.
(Guessing that it is NOT an option in Web Projects, however)