Thread: Custom Menu
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Rech Jim Rech is offline
external usenet poster
 
Posts: 2,718
Default Custom Menu

There are two ways that I know of to add custom faces to commandbar
controls. The LoadPicture method is available only for Excel 2002 and 2003
but you can use PasteFace in all versions from Excel 97 on.

You'd have to copy the custom picture to the clipboard and then do a
PasteFace. I put the picture right in a worksheet so:


ActiveSheet.Pictures("Picture 1").Copy
CommandBars("File").Controls("Close").PasteFace
CommandBars("File").Controls("Close").Style = msoButtonIconAndCaption

This adds a custom face to the built-in Close menuitem. You won't see the
face however unless you change its style so that's why I have the third line
above.


--
Jim Rech
Excel MVP