Custom Menu

  • Thread starter Thread starter Luis
  • Start date Start date
L

Luis

I have a custom menu and i'd like to know if it's posible
to put a symbol before the option, created by me.
The code i'm using is the following, and the property i'm
talking about is submenuitem.faceid=???

Set subMenuItem =
mnuitem.Controls.AddType:=msoControlButton)
subMenuItem.Caption = "Option1"
subMenuItem.FaceId = 17
subMenuItem.OnAction = "Openfile"
 
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.
 
Back
Top