+ Reply to Thread
Results 1 to 2 of 2

Bitmaps in custom toolbars look awful...

  1. #1

    Bitmaps in custom toolbars look awful...

    I am adding some custom toolbars to an excel workbook. I create the
    bitmaps using Paint, sized to 16 by 16, using the standard colors.

    When they are inserted into a custom toolbar using this type of code...

    Set myBar = CommandBars.Add(Name:="MyName", Position:=msoBarTop,
    Temporary:=True)
    myBar.Visible = True

    Set oldControl = myBar.Controls.Add(Type:=msoControlButton)
    oldControl.OnAction = "myCode"
    Set s = ActiveSheet.Shapes.AddPicture("myPath\myFile.bmp", msoTrue,
    msoFalse, 0, 0, 16, 16)
    s.Select
    Selection.Cut
    oldControl.PasteFace

    The bitmap comes out looking awful. How do I make the bitmap look nice
    (and transparent) like the MS provided toolbars?

    Regards, Brad


  2. #2
    Tom Ogilvy
    Guest

    Re: Bitmaps in custom toolbars look awful...

    See this thread:

    http://groups.google.co.uk/group/mic...1644f30a327685

    or the tinyurl version:

    http://tinyurl.com/8hh5l

    --
    Regards,
    Tom Ogilvy

    <[email protected]> wrote in message
    news:[email protected]...
    > I am adding some custom toolbars to an excel workbook. I create the
    > bitmaps using Paint, sized to 16 by 16, using the standard colors.
    >
    > When they are inserted into a custom toolbar using this type of code...
    >
    > Set myBar = CommandBars.Add(Name:="MyName", Position:=msoBarTop,
    > Temporary:=True)
    > myBar.Visible = True
    >
    > Set oldControl = myBar.Controls.Add(Type:=msoControlButton)
    > oldControl.OnAction = "myCode"
    > Set s = ActiveSheet.Shapes.AddPicture("myPath\myFile.bmp", msoTrue,
    > msoFalse, 0, 0, 16, 16)
    > s.Select
    > Selection.Cut
    > oldControl.PasteFace
    >
    > The bitmap comes out looking awful. How do I make the bitmap look nice
    > (and transparent) like the MS provided toolbars?
    >
    > Regards, Brad
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1