Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change toolbar icon in VBA
I want to set a collection of icons into a toolbar, but I want to use
specific icon images. How do I set them in VBA ? Is there a list of the icon ID's with their images I can select from ? (again set in VBA) Can I use external icon files ? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change toolbar icon in VBA
Hi,
If you want to use built in ones, you need to look at "FaceId" in help. There are absolutely thousands of them... This will show them all, but it's not fast. Sub faces() Dim i As Integer Dim cont As CommandBarControl Dim bar As CommandBar On Error GoTo catcher Application.ScreenUpdating = False Set bar = CommandBars.Add(Position:=msoBarFloating, MenuBar:=False, temporary:=True) Set cont = bar.Controls.Add(Type:=msoControlButton, temporary:=True) Do cont.FaceId = i cont.CopyFace ActiveSheet.Paste Cells(i + 1, 1) i = i + 1 Loop catcher: If Err.Number = 1004 Then Resume Next bar.Delete End Sub you can set them in your code by declaring a commandbarcontrol and then setting its faceid property. Sam "Paul" wrote: I want to set a collection of icons into a toolbar, but I want to use specific icon images. How do I set them in VBA ? Is there a list of the icon ID's with their images I can select from ? (again set in VBA) Can I use external icon files ? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
change icon on quick access toolbar | Excel Discussion (Misc queries) | |||
How do I add Icon to Toolbar? | Excel Programming | |||
toolbar or icon in a add-ins | Excel Programming | |||
Icon in toolbar | Excel Programming | |||
Add Icon to Toolbar | Excel Programming |