Help needed !

T

Tom

Hi

I created a customized toolbar with my own symbols, but with Excel 2003 the
symbols are displayed very ugly. I'm using the following script to display
the symbols:

Sub Example()
Dim cbrCtrl As CommandBarControl

ThisWorkbook.Worksheets(1).Shapes(1).Copy

Set cbrCtrl = Application.CommandBars("Tools").Controls.Add
With cbrCtrl
.Caption = "Hello World"
.OnAction = ThisWorkbook.Name & "!blabla"
.PasteFace
End With
Application.CutCopyMode = False
End Sub

The problem is, that the symbols won't be converted to a transparent
picture. Well, I found the following articles, which describes the solution,
but these examples are too difficult for me:

http://support.microsoft.com/default.aspx?scid=kb;en-us;288771&Product=ofw
HOWTO: Create a Transparent Picture For Office CommandBar Buttons

http://support.microsoft.com/default.aspx?scid=kb;en-us;824017&Product=ofw
HOW TO: Set the Mask Property and the Picture Property for an Office 2003
CommandBar Button


What I need is an example to create a transparent picture. The picture is
stored is within the workbbok (not a file). I'm willing to pay for it!!! If
there is anybody out there who can help me please contact me.

Tom
 
R

Rob Bovey

Hi Tom,

The Picture toolbar has a special control that is designed to make any
background color you click transparent. First select your picture with your
mouse. Then, display the Picture toolbar, by right-clicking over the
toolbar area and selecting the Picture toolbar from the shortcut menu. On
this toolbar, the second button from the right button is called Set
Transparent Color.

Click this button and your cursor will turn into a downward-pointing
arrow just like the picture on the toolbar button. Place the tip of the
downward-pointing arrow on the color of your image that you want to make
transparent and then click. That's all you need to do, the color you clicked
on will become transparent.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *
 
T

Tom

Rob

Thank you for your answer. The background color is already set to
transparent. The picture will be displayed correctly with Excel 97, 2000 &
2002, but with Excel 2003 it is displayed very ugly.

Tom
 
R

Rob Bovey

Hi Tom,

Have you set the background color as transparent using Excel 2003 and
saved it there? That's the only way to have any image appear properly in
Excel 2003. It uses a different underlying drawing method for its graphics
than previous versions, so if you set the image to transparent in any
previous version it will not appear transparent in Excel 2003.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *
 
T

Tom

Rob

I saved the image as gif with the option "alphatransparent" (with Macromedia
Fireworks) and stored it in the Excel worksheet. When I try to set the
background color of the picture in Excel to "transparent" (as you
described), the picture becomes complety transparent, then I displayed this
"completely transparent picture" as coomandbar symbol, but the background of
the commandbar symbol is white and not transparent?!?

Tom
 
R

Rob Bovey

Hi Tom,

I wonder if it has something to do with the file format? You might try
copying and pasting it into something very simple like the Paint program
that comes with Windows, then copy it back to Excel and try again. If that
doesn't work, I'm not sure what the problem is. I create custom commandbar
button faces using this method pretty frequently, so I know it works with
simple bitmap images.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *
 
K

keepitcool

afaik
excel doesnt use 32bit alpha transparency, but 24bit "indexed"
transparency where 1 color is designated as the "transparent" color.

From photoshop: save copy as, bitmap, select 24bit in options popup
From fireworks: in preview select optimize option: BMP 24, then export.


suc6

keepITcool

< email : keepitcool chello nl (with @ and .) >
< homepage: http://members.chello.nl/keepitcool >
 
T

Tom

keepitcool

Thanks. I saved the picture now in the format BMP 24, but now the background
color of the picture is displayed in black...

Tom
 
K

keepitcool

I've got a downloadable addin called FaceIT on my site.

It can load all 10000 FaceID's in office2003 and help you
store/load separate bitmap's (or pictures) for mask and picture into 1
icon. Download it,experiment a little. Have a look at the code.

For questions re the addin please email.


keepITcool

< email : keepitcool chello nl (with @ and .) >
< homepage: http://members.chello.nl/keepitcool >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top