Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
icons for custom menu choices
Get the icon in the clipboard, then use pasteface on the button. (doing
this with code) Regards, Tom Ogilvy John A Grandy wrote in message ... how to add icons to custom choices added to the cell menu (the right-click menu) such as the ones displayed for Cut Copy Paste ... ? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
icons for custom menu choices
Thanks Tom. But how to programatically load an icon from a .ico file into
the clipboad? "Tom Ogilvy" wrote in message ... Get the icon in the clipboard, then use pasteface on the button. (doing this with code) Regards, Tom Ogilvy John A Grandy wrote in message ... how to add icons to custom choices added to the cell menu (the right-click menu) such as the ones displayed for Cut Copy Paste ... ? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
icons for custom menu choices
There may be a better way, but I got this to work. You might want to play a
bit with the sizing of the image in the image control before you do the copy since it is copying the whole image control - not sure how this will affect background color and so forth. Sub PasteAFace() Dim cb_btn As CommandBarButton Dim ictrl As MSForms.Image Dim oleObj As OLEObject Set oleObj = ActiveSheet.OLEObjects.Add( _ ClassType:="Forms.Image.1", _ Link:=False, _ DisplayAsIcon:=False, _ Left:=193.5, Top:=185.25, _ Width:=66, Height:=63) Set ictrl = oleObj.Object With ictrl .PictureSizeMode = fmPictureSizeModeZoom .Picture = LoadPicture("C:\windows\winupd.ico") End With With oleObj .CopyPicture Appearance:=xlScreen, Format:=xlPicture .Delete End With Set cb_btn = CommandBars("Custom 3").Controls(1) cb_btn.PasteFace End Sub -- Regards, Tom Ogilvy John A Grandy wrote in message ... Thanks Tom. But how to programatically load an icon from a .ico file into the clipboad? "Tom Ogilvy" wrote in message ... Get the icon in the clipboard, then use pasteface on the button. (doing this with code) Regards, Tom Ogilvy John A Grandy wrote in message ... how to add icons to custom choices added to the cell menu (the right-click menu) such as the ones displayed for Cut Copy Paste ... ? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can I make a drop-down menu without cells containing the choices? | Excel Discussion (Misc queries) | |||
How can I change labels to a table for showing menu choices | Excel Discussion (Misc queries) | |||
Duplicate Menu Choices | Excel Discussion (Misc queries) | |||
Format from menu will not offer options or choices? | Excel Discussion (Misc queries) | |||
How do I change the order of choices in menu File- Send To | Excel Worksheet Functions |