PRoblem with Menu Set up
In your code, you have your Commandbar [Popup] Temporary status set to True.
It's Boolean, either True or False. ...
Set MySubMenu1 = MyMenu.Controls.Add(type:=msoControlButton, ID:=1,
Temporary:=True)
I was just curious as to the reason you had it set to True.
--
Regards,
Zack Barresse, aka firefytr, (GT = TFS FF Zack)
"ExcelMonkey" wrote in message
...
What do you mean by temporary status?
"Zack Barresse" wrote:
Thanks for sharing the solution! Others will benefit from it.
Btw, may I ask why you use the Temporary status like you do?
--
Regards,
Zack Barresse, aka firefytr, (GT = TFS FF Zack)
"ExcelMonkey" wrote in message
...
I needed to dim Dim MySubMenu1 As CommandBarButton Not CommandBarPopup!
"ExcelMonkey" wrote:
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
|