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: 216
Default Creating a toolbar for my add-in

Thanks in advance for any help.

I have a macro that I use a lot that I want to turn into
an add-in. I have saved it as an XLA file and selected it
through the Tools - Add-Ins Menu. However the menu
button for my add-in does not appear after installing the
add-in.

I created the menu button with the following code at the
beginning of my macro:

Dim HelpMenu As CommandBarControl
Dim NewMenu As CommandBarPopup
Dim MenuItem As CommandBarControl
Dim Submenuitem As CommandBarButton

On Error Resume Next
CommandBars(1).Controls("AP").Delete
On Error Resume Next

Set HelpMenu = CommandBars(1).FindControl(ID:=30010)
If HelpMenu Is Nothing Then
Set NewMenu = CommandBars(1).Controls _
.Add(Type:=msoControlPopup, temporary:=True)
Else
Set NewMenu = CommandBars(1).Controls _
.Add(Type:=msoControlPopup, Befo=HelpMenu.Index,
temporary:=True)
End If

NewMenu.Caption = "&AP"

Set MenuItem = NewMenu.Controls.Add(Type:=msoControlButton)
With MenuItem
.Caption = "F&oundations"
.OnAction = "ShowDialog"
End With

The rest of my code follows.

Does anyone know why this button does not appear when I
install the add-in?

Thanks again for any help. I am using Excel 2000.

Mike
 
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
XLSTART-Creating a toolbar Andre Setting up and Configuration of Excel 2 November 1st 07 05:20 PM
Creating a custom toolbar in VBA Gord Dibben Excel Programming 0 July 13th 04 06:04 PM
Creating ustom toolbar David C[_3_] Excel Programming 3 June 2nd 04 03:29 AM
Creating a Toolbar to add-in Mike Finister Excel Programming 1 May 26th 04 06:43 PM
Creating a toolbar using VBA Phill Excel Programming 1 December 2nd 03 11:04 PM


All times are GMT +1. The time now is 06:44 PM.

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"