Consulting

Results 1 to 6 of 6

Thread: Custom Menu Icons

  1. #1
    VBAX Expert
    Joined
    Feb 2005
    Posts
    929
    Location

    Custom Menu Icons

    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
    "It's not just the due date that's important, it's also the do date" [MWE]

    When your problem has been resolved, mark the thread SOLVED by clicking on the Thread Tools dropdown menu at the top of the thread.

  2. #2
    VBAX Tutor Erdin? E. Ka's Avatar
    Joined
    Sep 2006
    Location
    Bursa
    Posts
    264
    Location

    Button Editor

    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.

    Erdin? E. Kara?am | Loves from Bursa city in Republic of T?rkiye

  3. #3
    VBAX Expert
    Joined
    Feb 2005
    Posts
    929
    Location
    Quote Originally Posted by Erdin? E. Ka
    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.

    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?
    "It's not just the due date that's important, it's also the do date" [MWE]

    When your problem has been resolved, mark the thread SOLVED by clicking on the Thread Tools dropdown menu at the top of the thread.

  4. #4
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    You can use PasteFace to paste the image from the clipboard to the image control.

    Quote Originally Posted by VBA Help
    [vba]
    Set myControl = CommandBars.FindControl(Type:=msoControlButton, Id:=23)
    myControl.PasteFace
    [/vba]

  5. #5
    VBAX Newbie
    Joined
    Dec 2005
    Posts
    4
    Location
    Take a look at IPictureDisp in VBA help. This may help, but it's probably more work than it's worth.

    Wayne

  6. #6
    VBAX Expert
    Joined
    Feb 2005
    Posts
    929
    Location
    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 ...
    "It's not just the due date that's important, it's also the do date" [MWE]

    When your problem has been resolved, mark the thread SOLVED by clicking on the Thread Tools dropdown menu at the top of the thread.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •