E
ExcelMonkey
I have a menu that I install. I create a button in the menu. What I now
want to do is on the Onaction Property tell VBA to create a floating button
that pops up on my screen. I then want to attach that button to another
macro. So I only want this floating button to appear when I click on the
button in my menu. And I want it to float on my screen so that I can close
it when I do not need it. Does anyone know how to do this?
Sub MenuSetup()
Dim MenuBar As CommandBar
Dim MyMenu
Dim MySubMenu1 As CommandBarButton
Set MenuBar = CommandBars.ActiveMenuBar
Set MyMenu = MenuBar.Controls.Add(Type:=msoControlPopup, Temporary:=True)
MyMenu.Caption = "&Tools"
'MyMenu.BeginGroup = True
'******
'Create First Button Items
Set MySubMenu1 = MyMenu.Controls.Add(Type:=msoControlButton, ID:=1,
Temporary:=True)
MySubMenu1.Caption = "First Button"
MySubMenu1.FaceId = 590
MySubMenu1.OnAction = "Want this to call up floating button"
want to do is on the Onaction Property tell VBA to create a floating button
that pops up on my screen. I then want to attach that button to another
macro. So I only want this floating button to appear when I click on the
button in my menu. And I want it to float on my screen so that I can close
it when I do not need it. Does anyone know how to do this?
Sub MenuSetup()
Dim MenuBar As CommandBar
Dim MyMenu
Dim MySubMenu1 As CommandBarButton
Set MenuBar = CommandBars.ActiveMenuBar
Set MyMenu = MenuBar.Controls.Add(Type:=msoControlPopup, Temporary:=True)
MyMenu.Caption = "&Tools"
'MyMenu.BeginGroup = True
'******
'Create First Button Items
Set MySubMenu1 = MyMenu.Controls.Add(Type:=msoControlButton, ID:=1,
Temporary:=True)
MySubMenu1.Caption = "First Button"
MySubMenu1.FaceId = 590
MySubMenu1.OnAction = "Want this to call up floating button"