Assigning custom commandbar buttons FaceID numbers

  • Thread starter Thread starter lunsfld
  • Start date Start date
L

lunsfld

I have several custom buttons that I have created in Excel that I
would like to load into a commandbar that is created when an xla file
opens. Does anyone know of a way to assign a "blank" FaceID number to
my custom buttons? In other words, can I add my custom buttons to the
Excel library of FaceID's?
 
You cannot add your custom button images to Excel's list of FaceIDs.
However, you can copy the button image from an embedded picture in a
worksheet, and paste it onto a button:

ActiveWorksheet.Shapes("MyButton").CopyPicture xlScreen, xlBitmap
MyCommandButton.PasteFace

- Jon
 
Thanks Jon! Now I just have to figure out how to get my custom button
images into and embedded picture in a worksheet. Thanks again.
 
1. Insert menu > Picture > From File

or

2. Copy in graphics program, hold Shift while selecting Edit Menu > Paste
Picture.

When the picture is selected, go to the Name box (above cell A1, where it
says "Picture 1" or something similar), and type a useful name. In my
example I used "MyButton" but if you have several, use descriptive names for
what each button will do.

- Jon
 

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

Back
Top