[AccessD] FaceID master reference for CommandBars?

Michael R Mattys michael.mattys at adelphia.net
Tue Jul 27 12:29:41 CDT 2004


Display the available icons (FaceIds) for office commandbars
Submitted By
Andrew Baker

The following code will create several toolbars containing all the icons
available for use in office toolbars.



'Creates toolbars with 300 faces icons on each.

Sub ShowAllToolbarIcons()

    Const clMaxFaceId As Long = 3900, clButtonsPerBar As Long = 300,
clMaxToolbar As Long = 13

    Dim lThisBar As Long, lFirstId As Long, lLastId As Long

    Dim lThisId As Long, oThisCtrl As CommandBarButton

    Dim oCmdBar As CommandBar, oClipIcon As StdPicture



    On Error GoTo ErrMaxID

    For lThisBar = 0 To clMaxToolbar

        'Put 300 buttons on each bar

        lFirstId = lThisBar * clButtonsPerBar

        lLastId = lFirstId + clButtonsPerBar - 1

        Set oCmdBar = CommandBars.Add

        For lThisId = lFirstId To lLastId

           Set oThisCtrl = oCmdBar.Controls.Add

           oThisCtrl.FaceId = lThisId

           oThisCtrl.TooltipText = "FaceId = " & lThisId

        Next

        oCmdBar.Name = ("Buttons with FaceIds " & CStr(lFirstId) & " to " &
CStr(lLastId))

        oCmdBar.Width = 591

        oCmdBar.Visible = True

    Next



    Exit Sub



    'Delete the button that caused the error and set toolbar name

ErrMaxID:

    oThisCtrl.Delete

    oCmdBar.Name = ("Faces " & CStr(lFirstId) & " to " & CStr(lThisId - 1))

    oCmdBar.Width = 591

    oCmdBar.Visible = True

End Sub
----

Michael R. Mattys

Mattys MapLib for Microsoft MapPoint
http://www.mattysconsulting.com



----- Original Message ----- 
From: "Christopher Hawkins" <clh at christopherhawkins.com>
To: <accessd at databaseadvisors.com>
Sent: Tuesday, July 27, 2004 12:11 PM
Subject: [AccessD] FaceID master reference for CommandBars?


> God, how I hate CommandBars.  ;)
>
> Can anyone point me to a resource that lists the FaceID of each icon
> available for use on an Access Command Bar Button?
>
> -Christopher-
>
>
> -- 
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com




More information about the AccessD mailing list