LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default New menu bar item

Hi all

I'm trying to get a new item in the Worksheet Menu Bar
with an Add Inn, originally it was going to be one item
and it worked fine...i got it to appear on the Tools Menu
and to react as I wanted... soon my fellow workmates came
up with a similar need so what I tried is to have an item
on the tools menu that is like a combo menu (i.e.
the "Protection" menu inside the "tools" menu, has 3
items) but i have not been able to get a combo item inside
the tools menu... this is my code for the normal extra
control in the tools menu:

Sub createmenu()

Dim NewItem As CommandBarButton
Dim XLMenu As String
Dim XLCB As String
Dim NewItemName As String

XLCB = "Worksheet Menu Bar"
XLMenu = "Tools"

NewItemName = "Tool name here!"

On Error Resume Next
Application.CommandBars(XLCB).Controls(XLMenu).Con trols
(NewItemName).Delete

Set NewItem = Application.CommandBars(XLCB).Controls
(XLMenu).Controls.Add
With NewItem
..Caption = NewItemName
..OnAction = "macro name here!"
..FaceId = 0
..BeginGroup = True
End With

End Sub

I would like this to be a dropdown combo from where now i
choose from several tools....

any help is greatly appreciated...

regards
JS
 
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
Menu item disabled steven Excel Worksheet Functions 3 July 28th 06 12:59 AM
keep new menu item with workbook Andy G. Excel Discussion (Misc queries) 1 May 16th 06 08:09 PM
Menu items added with menu item editor in older versions Michael Hoffmann Excel Discussion (Misc queries) 2 January 7th 05 01:40 PM
Customer menu Item Todd Huttenstine[_3_] Excel Programming 3 April 30th 04 12:31 AM
Access menu item from VBS elidag Excel Programming 1 November 13th 03 04:22 PM


All times are GMT +1. The time now is 07:56 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"