ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Display toolbar icons on form button (https://www.excelbanter.com/excel-programming/325018-display-toolbar-icons-form-button.html)

[email protected]

Display toolbar icons on form button
 
If I know the FaceID of a commandbar picture I can easily display it on
a toolbar button. But what if I want to display the picture on a form
button?

The only way I can think of is to make a screen shot of the icon and
save it as a bitmap so that I can then link it to my button. This
seems pretty messy though - does anyone know of a more straight foward
approach?

Thanks in advance,
Andrew


keepITcool

Display toolbar icons on form button
 
Andrew,

Following approach works for xlXP and xl2003 only..


Private Sub UserForm_Initialize()

With Application.CommandBars(1)
With .Controls.Add(temporary:=True)
.FaceId = 59
Me.CommandButton1.Picture = .Picture
.Delete
End With
End With
End Sub





--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


wrote :

If I know the FaceID of a commandbar picture I can easily display it
on a toolbar button. But what if I want to display the picture on a
form button?

The only way I can think of is to make a screen shot of the icon and
save it as a bitmap so that I can then link it to my button. This
seems pretty messy though - does anyone know of a more straight foward
approach?

Thanks in advance,
Andrew


ross

Display toolbar icons on form button
 
also, you can paste any bitmap on to a control, at design time, which
might be easier to do.

for example, get a scrren shot of the face ID, paste into paint, crop
the image down and copy agian, then select the picture properties of
the cmd, and press ctrl+p.

Ross
www.methodsinexcel.co.uk

keepITcool

Display toolbar icons on form button
 

I've done all the cropping and transparenting...
and made an icon library (ICL) with all 10000+ Office2003 icons.


Microsoft is not too keen on redistribution...
but if you are REALLY interested... goto my site.

Follow instructions.. and maybe you;ll get them.


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


ross wrote :

also, you can paste any bitmap on to a control, at design time, which
might be easier to do.

for example, get a scrren shot of the face ID, paste into paint, crop
the image down and copy agian, then select the picture properties of
the cmd, and press ctrl+p.

Ross
www.methodsinexcel.co.uk


Andrew[_16_]

Display toolbar icons on form button
 
Thanks for the suggestions guys. Since I'm working with XL2000 your
first suggestion won't work for me. Guess I'm stuck with the
screen-shot approach. I tried to go to your website but it is blocked
for some reason?

Thanks again,
Andrew

"keepITcool" wrote in message oft.com...
I've done all the cropping and transparenting...
and made an icon library (ICL) with all 10000+ Office2003 icons.


Microsoft is not too keen on redistribution...
but if you are REALLY interested... goto my site.

Follow instructions.. and maybe you;ll get them.


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


ross wrote :

also, you can paste any bitmap on to a control, at design time, which
might be easier to do.

for example, get a scrren shot of the face ID, paste into paint, crop
the image down and copy agian, then select the picture properties of
the cmd, and press ctrl+p.

Ross
www.methodsinexcel.co.uk


keepITcool

Display toolbar icons on form button
 
Andy,

your hotmail bounced. mailbox unavailable.

my website is a redirect to http://members.chello.nl/keepitcool/
either that or just send me an email.
rot13 my sender address or add @ and . to the middle of my signature.

--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Andrew wrote :

Thanks for the suggestions guys. Since I'm working with XL2000 your
first suggestion won't work for me. Guess I'm stuck with the
screen-shot approach. I tried to go to your website but it is blocked
for some reason?

Thanks again,
Andrew

"keepITcool" wrote in message
oft.com...
I've done all the cropping and transparenting...
and made an icon library (ICL) with all 10000+ Office2003 icons.


Microsoft is not too keen on redistribution...
but if you are REALLY interested... goto my site.

Follow instructions.. and maybe you;ll get them.


--
keepITcool
www.XLsupport.com | keepITcool chello nl | amsterdam



ross wrote :

also, you can paste any bitmap on to a control, at design time,
which might be easier to do.

for example, get a scrren shot of the face ID, paste into paint,
crop the image down and copy agian, then select the picture
properties of the cmd, and press ctrl+p.

Ross
www.methodsinexcel.co.uk



All times are GMT +1. The time now is 06:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com