Need a list of command button face ID's (images)

M

mikeburg

Where can I obtain a list of the command button face ID's (images)
their corresponding image ID numbers used in Excel?

Or

Even better, how can I create a worksheet that lists the command butto
face ID's (images) & their corresponding image ID numbers in cells?

Thanks for the help. mikebur
 
J

Jim Cone

mikeburg,

Or even better...
I use my own "Display Face Id's" Excel add-in to provide a display
of the Excel button faces available. There are somewhere around
4000 button faces available, depending on your Excel version.

There are several of these add-in programs around,
but I feel mine is a little easier to use.

The add-in code includes assigning a button face to
a custom menu item and I supply the project
password with the program.

Glad to send it along, no charge, upon direct request.
Remove XXX from my email address.

Regards,
Jim Cone
San Francisco, USA
(e-mail address removed)


"mikeburg"
wrote in message
Where can I obtain a list of the command button face ID's (images) &
their corresponding image ID numbers used in Excel?
Or
Even better, how can I create a worksheet that lists the command button
face ID's (images) & their corresponding image ID numbers in cells?
Thanks for the help.
mikeburg
 
R

RB Smissaert

This code will dump them all in the sheet:


Sub ShowAllFaceID()

Dim CBC As CommandBarControl
Dim i As Long
Dim n As Long
Dim c As Long
Dim strSpacer As String
Dim lFaceIDCount As Long
Dim sh As Shape

Application.ScreenUpdating = False
Application.Cursor = xlWait
strSpacer = "~" & String(3, Chr(32))
Cells.Clear

'get rid of the old FaceID's first
'---------------------------------
For Each sh In ActiveSheet.Shapes
sh.Delete
Next

Set CBC = _
CommandBars("Worksheet Menu Bar").Controls.Add(Type:=msoControlButton, _
temporary:=True)

Do
If i Mod 12 = 0 Then
n = n + 1
c = 1
Else
c = c + 1
End If
i = i + 1
On Error GoTo ERROROUT
CBC.FaceId = i
On Error Resume Next
CBC.CopyFace
If Err.Number = 0 Then
Cells(n, c) = strSpacer & i
ActiveSheet.Paste Cells(n, c)
Else
Err.Clear
End If
Application.StatusBar = _
" Dumping all Office FaceID's in sheet, please wait ... " &
i
Loop

ERROROUT:
CBC.Delete

With ActiveSheet.DrawingObjects
.ShapeRange.ScaleWidth 1.28, msoFalse, msoScaleFromTopLeft
.ShapeRange.ScaleHeight 1.28, msoFalse, msoScaleFromTopLeft
Range(Cells(1), Cells(n, 1)).RowHeight = .ShapeRange.Height
End With

Range(Cells(1), Cells(n, 12)).Columns.AutoFit

With Application
.ScreenUpdating = True
.Cursor = xlDefault
.StatusBar = False
End With

End Sub


RBS
 
J

Jim Cone

RBS,
Nicely done.
Regards,
Jim Cone
San Francisco, USA


"RB Smissaert"
<[email protected]>
wrote in message
This code will dump them all in the sheet:
Sub ShowAllFaceID()
Dim CBC As CommandBarControl
Dim i As Long
Dim n As Long
Dim c As Long
Dim strSpacer As String
Dim lFaceIDCount As Long
Dim sh As Shape
Application.ScreenUpdating = False
Application.Cursor = xlWait
strSpacer = "~" & String(3, Chr(32))
Cells.Clear
'get rid of the old FaceID's first
'---------------------------------
For Each sh In ActiveSheet.Shapes
sh.Delete
Next

Set CBC = _
CommandBars("Worksheet Menu Bar").Controls.Add(Type:=msoControlButton, _
temporary:=True)
Do
If i Mod 12 = 0 Then
n = n + 1
c = 1
Else
c = c + 1
End If
i = i + 1
On Error GoTo ERROROUT
CBC.FaceId = i
On Error Resume Next
CBC.CopyFace
If Err.Number = 0 Then
Cells(n, c) = strSpacer & i
ActiveSheet.Paste Cells(n, c)
Else
Err.Clear
End If
Application.StatusBar = _
" Dumping all Office FaceID's in sheet, please wait ... " & i
Loop

ERROROUT:
CBC.Delete
With ActiveSheet.DrawingObjects
.ShapeRange.ScaleWidth 1.28, msoFalse, msoScaleFromTopLeft
.ShapeRange.ScaleHeight 1.28, msoFalse, msoScaleFromTopLeft
Range(Cells(1), Cells(n, 1)).RowHeight = .ShapeRange.Height
End With
Range(Cells(1), Cells(n, 12)).Columns.AutoFit
With Application
.ScreenUpdating = True
.Cursor = xlDefault
.StatusBar = False
End With
End Sub
RBS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top