Is this possible? Custom menu bar format?

Andrew Fergus

MrExcel MVP
Joined
Sep 9, 2004
Messages
5,462
Office Version
  1. 365
  2. 2021
  3. 2016
Platform
  1. Windows
Hi All
I have some custom menu bars in my database that I would like to add some basic formatting to, if possible. I created my main menu bar using a macro - I used an "AddMenu" macro command for each sub-menu. Each submenu was made using a standalone macro, with a varying number of commands for each submenu.

What I would like to do is hard to explain but if you follow my example, you will see what I mean. In Access (I'm using Access 2K) if you click on a standard Access menu, e.g."File", there are a number of options, including New, Open, Get External Data, Close, Save, Save As etc. Between the "Close" and "Save" options there is a sunken line - there is the same thing between "Export" and "Page SetUp". This is used to segregate options or to group menu options (what I would call submenu options) into logical groups.

How do I recreate such a line in a custom submenu? (Where a submenu is a list of commands available on the main menu)
TIA, Andrew. :)
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
If you go into access and Select View & Toolbars then Customize....

You will thn be able to right click on your toolbar and select Begin group. This will put in the sunken marks for you.

Regards

Pete
 
Upvote 0
Hi Pete

Thanks for the quick reply - at first it looked so easy. However, I can't get this to work - my menu only shows when one of the forms is open and the right click doesn't give me those options when the form is open.

If I go down the View -> Toolbars -> Customise pathway while in the form design, I get the "Begin Group" option but my menu doesn't appear as an option in the toolbar list - this could be because either : I created the menu using macros; it isn't a toolbar, or my menu only shows when the form is open.

I tried adding that command (View -> Toolbar -> Customise) to my custom menu to see if I could get to it through my form in view mode, but no luck there either - I couldn't get that command into my macro.

Is there something I am missing? Do I need to rebuild the menus using toolbar -> customise? Or are there any other suggestions?

Thanks, Andrew. :confused:
 
Upvote 0
Hi, sorry did not realise it would not work the same as a custom toolbar.

I had a look through the help files and it suggested:

"To create a line between two menu commands, type a hyphen (-) in the Macro Name column between the appropriate menu commands."

Sorry i have no idea if this will work. If it does can you post back to let me know.

Regards

Pete
 
Upvote 0
Hi Pete
You are the man! It works perfectly. Thanks very much for taking the trouble to find out. I dread to ask, but how on earth did you find that?
Cheers, Andrew :biggrin:
 
Upvote 0
I had a look at the macro AddMenu and Thought that i am completly lost!! so presed F1 and the answer was fortunatly in the help file about half way down the page.

Regards

Pete
 
Upvote 0

Forum statistics

Threads
1,221,893
Messages
6,162,662
Members
451,781
Latest member
DylantheD

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