use standard icon in image control

  • Thread starter Thread starter John A Grandy
  • Start date Start date
J

John A Grandy

how to utilize hundreds of standard Excel icons as the Picture property in
an Image control

Image.Picture =

i'm talking about the Icons which are utilized as the graphic in
CommandBarButtons when setting

CommandBarButton.FaceID =
 
John,

In 2002, the commandbarbutton has a picture property. In 2000 it doesn't.

There is a workaround that we found when we ran into the version problem
with another NG user called Bart Smissaert. It involves accessing the
commandbarbutton as a picture off the clipboard. To do that, there is a
superb routine on Stephen Bullen's site called PastePicture, but it is
complex, and it is not mine, so I have not reproduced it on my site.

If you download Stephen's code and paste it into your project, you should be
able to get access to the faces picture doing something like this:

'this puts it on the clipboard
CommandBarButton.Copyface
'this gets it back from the clipboard into the image list
Set iImageName = ImageList1.ListImages.Add(,,PastePicture(xlBitmap))

I believe Bart has a final working version, and I'll see if I can get a copy
for you.

Yours and good luck,

Robin Hammond
www.enhanceddatasystems.com
Check out our XspandXL add-in
 
Back
Top