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: 553
Default PRoblem with Menu Set up

I have a xla menu that I am trying to set up upon start up. It is failing
ont the line of code:

Set MySubMenu1 = MyMenu.Controls.Add(Type:=msoControlButton, ID:=1,
Temporary:=True)

If I change the "msoControlButton" to "msoControlPopup" it works. Problem
is the menue item has little black arrow implying there are sub menus.
Since there aren't, I do no want to show the black arrows. I have used
msoControlButton before and it worked. Is it failing because of the way I
have dimeneioned MySubMenu1?

Sub MenuSetup()
Dim GTMenuBar As CommandBar
Dim MyMenu
Dim MySubMenu1 As CommandBarPopup
Dim MyControl As CommandBarButton
Dim MyButton As CommandBarButton


Set GTMenuBar = CommandBars.ActiveMenuBar

Set MyMenu = GTMenuBar.Controls.Add(Type:=msoControlPopup, Temporary:=True)
MyMenu.Caption = "&PF Tools"
'MyMenu.BeginGroup = True

'******
'Create First Menu Item
Set MySubMenu1 = MyMenu.Controls.Add(Type:=msoControlButton, ID:=1,
Temporary:=True)
MySubMenu1.Caption = "My Program"
MySubMenu1.OnAction = "BigCode"


Thanks
 
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
problem with custom menu Tony Excel Programming 4 May 3rd 05 02:27 PM
MENU Problem tony moody Excel Programming 0 September 18th 04 05:32 PM
MENU Problem TAM Excel Programming 0 September 18th 04 03:00 PM
Menu problem [email protected] Excel Programming 0 October 23rd 03 01:53 AM


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