I use this code when I need to find an icon that will be useful:
Sub ShowFaceIDs()
Dim oToolbar As CommandBar
Dim oButton As CommandBarButton
Dim IDStart As Long, IDStop As Long
Dim iIcon As Long
On Error GoTo addToolBar
Set oToolbar = Application.CommandBars("FaceIds")
On Error GoTo 0
If oToolbar.Visible Then
oToolbar.Delete
Else
addToolBar:
CreateToolBar "FaceIds"
Set oToolbar = Application.CommandBars("FaceIds")
IDStart = 1 '<=== change to 500 to get next 500 etc.
IDStop = IDStart + 499
For iIcon = IDStart To IDStop
Set oButton = oToolbar.Controls.Add(Type:=msoControlButton, ID:=2950)
oButton.FaceId = iIcon
oButton.Caption = "FaceID = " & iIcon
Next iIcon
End If
I want to change this so instead of showing the icons on a toolbar - I want them to show on a form. Is this possible?
The reason i want to do this is I use Excel 2007 and toolbars are a little clunky compared to earlier versions.
Bookmarks