![]() |
Two menus appears in commandbar(Cells)
Hi there i have a problem, when openning the XL App, two menus should be added to th Commandbar(Cells) : one is: Code ------------------- Set ComPop = Application.CommandBars("Cell").Controls.Add(Type: =msoControlPopup, befo=10) ComPop.BeginGroup = True ComPop.Caption = "&Favourites ------------------- Second is: Code ------------------- With Application.CommandBars("cell").Controls.Add(befor e:=1, Type:=msoControlPopup) .Caption = "Gold Menu" End Wit ------------------- The problme is that one appears in the comaandbar(cells) but hte othe not, i tried to modify the argument befo=1 or 2 or even 9, bu without success, both togather never appear in the commandbar(cells). i need them both to be appear in the commandbar(Cells) -- helmekk ----------------------------------------------------------------------- helmekki's Profile: http://www.excelforum.com/member.php...nfo&userid=693 View this thread: http://www.excelforum.com/showthread.php?threadid=39526 |
Two menus appears in commandbar(Cells)
They both create for me. Is there anything else?
-- HTH RP (remove nothere from the email address if mailing direct) "helmekki" wrote in message ... Hi there i have a problem, when openning the XL App, two menus should be added to the Commandbar(Cells) : one is: Code: -------------------- Set ComPop = Application.CommandBars("Cell").Controls.Add(Type: =msoControlPopup, befo=10) ComPop.BeginGroup = True ComPop.Caption = "&Favourites" -------------------- Second is: Code: -------------------- With Application.CommandBars("cell").Controls.Add(befor e:=1, Type:=msoControlPopup) .Caption = "Gold Menu" End With -------------------- The problme is that one appears in the comaandbar(cells) but hte other not, i tried to modify the argument befo=1 or 2 or even 9, but without success, both togather never appear in the commandbar(cells). i need them both to be appear in the commandbar(Cells) ? -- helmekki ------------------------------------------------------------------------ helmekki's Profile: http://www.excelforum.com/member.php...fo&userid=6939 View this thread: http://www.excelforum.com/showthread...hreadid=395264 |
Two menus appears in commandbar(Cells)
Hi,
are you in the page break preview mode? there are two(and more) commandbars named "Cell". one is a shortcut menu in the normal view, another is in the page break preview. if you want to customize all "Cell" commandbars, try this: Sub Test() Dim cb As CommandBar For Each cb In Application.CommandBars If cb.Name = "Cell" And cb.BuiltIn Then 'your code to add items. With .Controls.Add(Type:=msoControlPopup, befo=10) .BeginGroup = True .Caption = "&Favourites" End With End If Next End Sub -- HTH, okaizawa helmekki wrote: Hi there i have a problem, when openning the XL App, two menus should be added to the Commandbar(Cells) : one is: Code: -------------------- Set ComPop = Application.CommandBars("Cell").Controls.Add(Type: =msoControlPopup, befo=10) ComPop.BeginGroup = True ComPop.Caption = "&Favourites" -------------------- Second is: Code: -------------------- With Application.CommandBars("cell").Controls.Add(befor e:=1, Type:=msoControlPopup) .Caption = "Gold Menu" End With -------------------- The problme is that one appears in the comaandbar(cells) but hte other not, i tried to modify the argument befo=1 or 2 or even 9, but without success, both togather never appear in the commandbar(cells). i need them both to be appear in the commandbar(Cells) ? |
Two menus appears in commandbar(Cells)
sorry for my mistake.
With .Controls.Add(Type:=msoControlPopup, befo=10) With cb.Controls.Add(Type:=msoControlPopup, befo=10) is correct. -- okaizawa |
Two menus appears in commandbar(Cells)
Ok, thank u very muc -- helmekk ----------------------------------------------------------------------- helmekki's Profile: http://www.excelforum.com/member.php...nfo&userid=693 View this thread: http://www.excelforum.com/showthread.php?threadid=39526 |
All times are GMT +1. The time now is 08:33 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com