Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Greegan
 
Posts: n/a
Default Adding buttons to a new menu bar

I am cross posting ( i think ) because the server seems to have an issue
with the other newsgroup (possibly)

Hello everyone I hope someone can help me here.

I have a problem at work with my ID resetting and my menu bar (my custom
menu bar) has the menus but none of my buttons or the menu lists stay with
the ID change...

This is something that is too small a problem for our IT people to work out
so I did a fix for it. I have a script itself run and add the macros to the
menu lists. It works with the following...

Dim CmdBar As CommandBar
Dim CmdBarMenu As CommandBarControl
Dim CmdBarMenuItem As CommandBarControl
Set CmdBar = Application.CommandBars("My Custom Menu Bar")
Set CmdBarMenu = CmdBar.Controls("Software")
Set CmdBarMenuItem = CmdBarMenu.Controls.Add
With CmdBarMenuItem
.Caption = "5-Digit Zip Code Format"
.OnAction = "'" & ThisWorkbook.Name & "'!C200010"
.Tag = "SomeString"
End With


This is repeated for each menu I have manually typed in the bar, "Software"
being one of them.

So I'm able to add the menu lists to menus I've entered as the one mentioned
above, however I don't know how to add Buttons to my menu bar and keep the
assigned macro linked to the command (string?).

Can anyone assist with this? I need something like the above script but it
needs to add the macro to the button. I would imagine its a bit different
because you need to identify the button image but man would it help if
someone out there could assist.

Thank you ahead of time.

G






  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron de Bruin
 
Posts: n/a
Default Adding buttons to a new menu bar

Hi Greegan

See this pages for examples

http://support.microsoft.com/default...02&Product=xlw
How to customize menus and menu bars in Excel

http://www.j-walk.com/ss/excel/tips/tip53.htm
Creating Custom Menus (John Walkenbach) TIP

http://www.erlandsendata.no/english/...oadcommandbars
Ole P. Erlandsen's Web Site (Example workbooks)

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Greegan" wrote in message ...
I am cross posting ( i think ) because the server seems to have an issue
with the other newsgroup (possibly)

Hello everyone I hope someone can help me here.

I have a problem at work with my ID resetting and my menu bar (my custom
menu bar) has the menus but none of my buttons or the menu lists stay with
the ID change...

This is something that is too small a problem for our IT people to work out
so I did a fix for it. I have a script itself run and add the macros to the
menu lists. It works with the following...

Dim CmdBar As CommandBar
Dim CmdBarMenu As CommandBarControl
Dim CmdBarMenuItem As CommandBarControl
Set CmdBar = Application.CommandBars("My Custom Menu Bar")
Set CmdBarMenu = CmdBar.Controls("Software")
Set CmdBarMenuItem = CmdBarMenu.Controls.Add
With CmdBarMenuItem
.Caption = "5-Digit Zip Code Format"
.OnAction = "'" & ThisWorkbook.Name & "'!C200010"
.Tag = "SomeString"
End With


This is repeated for each menu I have manually typed in the bar, "Software"
being one of them.

So I'm able to add the menu lists to menus I've entered as the one mentioned
above, however I don't know how to add Buttons to my menu bar and keep the
assigned macro linked to the command (string?).

Can anyone assist with this? I need something like the above script but it
needs to add the macro to the button. I would imagine its a bit different
because you need to identify the button image but man would it help if
someone out there could assist.

Thank you ahead of time.

G








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding Customised Buttons to a toolbar GLT Excel Discussion (Misc queries) 6 March 22nd 06 06:32 AM
Adding a menu DMc2005 Excel Discussion (Misc queries) 3 October 2nd 05 04:14 PM
Where is the "Chart Menu" for adding a trendline to a set of #s? Exceller In America Charts and Charting in Excel 1 August 5th 05 08:49 PM
When I drag the mouse arrow over menu buttons, no description app. Bill Tasker Excel Discussion (Misc queries) 1 December 14th 04 10:20 AM
edit the buttons in right click menu jc_pace Excel Worksheet Functions 1 November 16th 04 06:51 PM


All times are GMT +1. The time now is 05:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"