#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Custom Menu

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"
  #2   Report Post  
Posted to microsoft.public.excel.programming
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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
custom menu winqan Excel Discussion (Misc queries) 1 February 6th 06 10:51 AM
Custom Menu Help EAB1977 Excel Worksheet Functions 1 November 12th 05 01:02 AM
Custom menu Alan M Excel Worksheet Functions 4 September 18th 05 11:57 PM
Remove custom menu Excel Discussion (Misc queries) 5 March 8th 05 05:06 PM
Custom Menu ewize1 Excel Programming 2 October 30th 03 05:16 PM


All times are GMT +1. The time now is 02:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"