PDA

View Full Version : Custom Menu Icons



MWE
10-07-2006, 04:29 PM
this is not really an Excel question (could be any appl), but more people seem to browse Excel, so ...

I have built many pull down menus using VBA, but I always have used one of the standard FaceID numbers. I now want to save custom picture patterns and reuse them in some other application. So, how does one save the 16x16 picture pattern for a menu button icon for future reuse? And then when building a custom menu using VBA, how does one reference that picture pattern?

Thanks

Erdin? E. Ka
10-07-2006, 04:37 PM
Hi,

You will find a perfect add-in (Andy Pope & Stephen Bullen's appl.) about button editing in the zip file.

I am sure that you will like it.:p

:hi:

MWE
10-08-2006, 06:15 PM
Hi,

You will find a perfect add-in (Andy Pope & Stephen Bullen's appl.) about button editing in the zip file.

I am sure that you will like it.:p

:hi:Thanks, that is a useful addin, but it does not answer my question. I can create the 16x16 bitmap in a dozen ways using any number of tools (including the built in button editor in any MS appl). What I want to know is how to assign a particular image to a menu button in two cases:
1) how do I do that for a menu item created using the "Customize" feature in vitually any appl. I know how to copy button images around, edit them, etc., but how do I save one of those images so that I can use it "somewhere else"? And having saved it, how do I attach it to a menu in another appl?
2) how do I do that when building a menu using VBA? I know how to use the FaceID approach (using one of the 2500 or so available images), but how do I assign a custom bitmap?

Jacob Hilderbrand
10-08-2006, 06:19 PM
You can use PasteFace to paste the image from the clipboard to the image control.




Set myControl = CommandBars.FindControl(Type:=msoControlButton, Id:=23)
myControl.PasteFace

webtubbs
10-10-2006, 05:42 AM
Take a look at IPictureDisp in VBA help. This may help, but it's probably more work than it's worth.

Wayne

MWE
10-11-2006, 11:44 AM
UPDATE:

1) how do I do that for a menu item created using the "Customize" feature in vitually any appl. I know how to copy button images around, edit them, etc., but how do I save one of those images so that I can use it "somewhere else"? And having saved it, how do I attach it to a menu in another appl?

I figured out how to save a button image to an external file (stupidly simple, just copy and paste into something like Paint and then save it). So 1A is done. Now, how do I take one of these .bmp files and manually paste it into an application's menu? Reversing the process that got the data to Paint does not work


2) how do I do that when building a menu using VBA? I know how to use the FaceID approach (using one of the 2500 or so available images), but how do I assign a custom bitmap?

DRJ sent me something that I need to try. Stay tuned ...