Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Add Button to msoControlPopup ?

Hi,

Is it possible to add a button to a custom popupmenu item
(msoControlPopup)


TIA
Soniya
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default Add Button to msoControlPopup ?

Soniya,

Do you mean sub-menus, like this?

Dim oCB As CommandBar
Dim iHelpMenu As Integer
Dim oCBCtl As CommandBarControl

On Error Resume Next
Application.CommandBars("Worksheet Menu Bar").Controls("CD
Player").Delete
On Error GoTo 0

Set oCB = Application.CommandBars("Worksheet Menu Bar")

iHelpMenu = oCB.Controls("Help").Index

Set oCBCtl = oCB.Controls.Add(Type:=msoControlPopup, Befo=iHelpMenu)
oCBCtl.Caption = "CD Player"

With oCBCtl
With .Controls.Add(Type:=msoControlPopup)
.BeginGroup = True
.Caption = "Play Controls"
With .Controls.Add(Type:=msoControlButton)
.Caption = "Play CD"
.OnAction = "CDActions"
.Enabled = True
End With
With .Controls.Add(Type:=msoControlButton)
.Caption = "Stop CD"
.OnAction = "CDActions"
.Enabled = True
End With
With .Controls.Add(Type:=msoControlButton)
.Caption = "Pause CD"
.OnAction = "CDActions"
.Enabled = False
End With
With .Controls.Add(Type:=msoControlButton)
.Caption = "Resume CD"
.OnAction = "CDActions"
.Enabled = False
End With
With .Controls.Add(Type:=msoControlButton)
.Caption = "Pause CD"
.OnAction = "CDActions"
.Enabled = False
End With
End With
With .Controls.Add(Type:=msoControlButton)
.BeginGroup = True
.Caption = "Eject cd"
.OnAction = "CDActions"
.Enabled = False
End With
With .Controls.Add(Type:=msoControlButton)
.BeginGroup = True
.Caption = "Prev Track"
.OnAction = "CDActions"
.Enabled = False
End With
With .Controls.Add(Type:=msoControlButton)
.Caption = "Next Track"
.OnAction = "CDActions"
.Enabled = True
End With
End With

End Sub

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Soniya" wrote in message
...
Hi,

Is it possible to add a button to a custom popupmenu item
(msoControlPopup)


TIA
Soniya



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Add Button to msoControlPopup ?

Sorry, I have to revise my question

Is it possible to add FaceID to a custom popupmenu item
(msoControlPopup)



TIA
Soniya


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default Add Button to msoControlPopup ?

Soniya,

I have not seen one in any menus, and using .FaceiD on a popup throws an
error in my tests, so it suggests not. Trying to paste an image onto it
doesn't work either.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Soniya" wrote in message
...
Sorry, I have to revise my question

Is it possible to add FaceID to a custom popupmenu item
(msoControlPopup)



TIA
Soniya




Reply
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
Undo button and redo button quit stillkicking Excel Discussion (Misc queries) 7 November 14th 09 04:40 PM
Inserting a Graphic on a Button when the Button is Assigned to a M smck Excel Discussion (Misc queries) 2 October 27th 09 04:46 PM
insert row above button (retrieve position of button) Max Excel Discussion (Misc queries) 3 November 7th 07 06:27 PM
How can I assign a symbol to a button (like the $ button) NickW Excel Discussion (Misc queries) 2 September 6th 05 02:45 PM
How do I lock a radio button group if a N/A button is selected worry a lot Excel Discussion (Misc queries) 2 May 21st 05 08:33 PM


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