Excel Developer Tip


Return to The Spreadsheet Page

Excel page

Tip archives

Identifying FaceID Values for CommandBar Images

In a previous tip I presented VBA code that help you identify the FaceID values for MS Office's built-in CommandBar images. Setting the FaceID property is useful for those who create custom menus or toolbars.

Note:
If you create custom menus, refer to another tip that simplifies the process.

I've created an Excel add-in that displays the CommandBar images in a UserForm. As you move the mouse pointer over an image, its FaceID value is displayed.

 

Download the add-in

You can download the faceids.xla add-in and examine the code to see how it works (the add-in is not protected)

How it works

The faceids.xla uses 12 GIF files to store the images. A UserForm contains an Image control, and clicking the buttons loads a new graphic file into the Image control. Mouse movements over the Image control are trapped, and the coordinates are converted into a FaceID value.

Installing the add-in

  1. Download the add-in using the link above (it's a self-extracting EXE).
  2. Extract the files by double-clicking faceids.exe
  3. Start Excel
  4. Select Tools Add-Ins.
  5. In the Add-Ins dialog box, click the Browse button
  6. Locate the faceids.xla file (in the directory specified in Step 2)

After performing these steps, the add-in will be loaded whenever you start Excel. When the add-in is loaded, the Tools menu will display a new command: J-Walk FaceId Identifier. Select this command to display the UserForm.

Another Approach

Some may prefer to use the handy macro created by John McLean. This macro, when executed, displays every FaceID image in a worksheet grid for easy reference. John has made this file available, and you can download it here.