Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 129
Default 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) ?


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 129
Default 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
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

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
Sub-menus of main menus for Excel 2007 Eleanor Peppard New Users to Excel 1 March 16th 10 04:12 PM
Pop up menus in cells fed by lists in another workbook Gerardo Excel Worksheet Functions 3 August 25th 08 08:58 PM
formating cells using formula rather than menus/VBA Andreww Excel Worksheet Functions 6 May 30th 06 01:43 PM
Not all pasted text appears in cells cjswift Excel Discussion (Misc queries) 1 August 8th 05 03:43 PM
Overriding Actions of Excel DropDown Menus and Poup Menus Von Shean Excel Programming 2 February 3rd 04 06:43 AM


All times are GMT +1. The time now is 02:20 AM.

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

About Us

"It's about Microsoft Excel"