Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
programmatically change icons on a menubar
Hello--how does one programmatically change the icons on a menubar? The
object browser is sort of cryptic on this point. More specifically, I am looking to remove all icons from the buttons on my add-in menubar. Thanks, Abe |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
programmatically change icons on a menubar
Are you referring to a menu that your addin creates? If so, it will be in
the code that creates the menu, and that would need adjusting. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) wrote in message oups.com... Hello--how does one programmatically change the icons on a menubar? The object browser is sort of cryptic on this point. More specifically, I am looking to remove all icons from the buttons on my add-in menubar. Thanks, Abe |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
programmatically change icons on a menubar
Run ButtonStyles for a few ideas.
Sub newTestBar() Dim i As Long On Error Resume Next CommandBars("TestBar").Delete On Error GoTo 0 With CommandBars.Add("TestBar", msoBarFloating, False, True) For i = 1 To 5 With .Controls.Add(msoControlButton) .Caption = "Button " & i .FaceId = i + 79 End With .Visible = True Next End With End Sub Sub ButtonStyles() Dim cBar As CommandBar Dim cbb As CommandBarButton Dim sty As Long, i As Long On Error Resume Next Set cBar = CommandBars("TestBar") If cBar Is Nothing Then newTestBar Set cBar = CommandBars("TestBar") End If On Error GoTo 0 sty = msoButtonIcon ' 1 sty = msoButtonCaption ' 2 sty = msoButtonIconAndCaption ' 3 For i = 1 To 3 sty = i For Each cbb In cBar.Controls cbb.Style = sty 'to completely remove icon - 'cbb.FaceId = 1 or cbb.BuiltInFace = True Next Stop ' look at the bar Next ' cBar.Delete ' uncomment to delete the bar End Sub Regards, Peter T wrote in message oups.com... Hello--how does one programmatically change the icons on a menubar? The object browser is sort of cryptic on this point. More specifically, I am looking to remove all icons from the buttons on my add-in menubar. Thanks, Abe |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to change the icons on excel folders? | Excel Discussion (Misc queries) | |||
Change Color of Icons | Excel Discussion (Misc queries) | |||
Can I change the menubar to look like excel 2003? | New Users to Excel | |||
How to change cond. format icons in EXCEL 2007? | Excel Worksheet Functions | |||
Change color of tool bar icons | Excel Discussion (Misc queries) |