![]() |
Toolbar Button
I want to load an icon image (.ico file) to a
CommandBarButton. How can I do this? I know CommandBarButton has the method "PasteFace", but this requires the image first copied onto the clipboard. I don't think (can I?) I can load an .ico file directly to clipboard. Any solution? |
Toolbar Button
-- HTH Bob Phillips "Gary Chan" wrote in message ... I want to load an icon image (.ico file) to a CommandBarButton. How can I do this? I know CommandBarButton has the method "PasteFace", but this requires the image first copied onto the clipboard. I don't think (can I?) I can load an .ico file directly to clipboard. Any solution? |
Toolbar Button
Gary,
In essence, you need to have the icons as an image somewhere and load the shape. I do this by putting them on a hidden sheet on the workbook that the commandbar is created from, with code somewhat like cbTable.Shapes(shapename).CopyPicture cbCtl.PasteFace where cbTable is the codename of the sheet containing the picture, shapename is the name of the shape, such as 'Picture 30', and cbCtl is an object variable for the control being added. If you want to use the builtin faceids, you would use something like cbCtl.FaceId = faceIdNum -- HTH Bob Phillips "Gary Chan" wrote in message ... I want to load an icon image (.ico file) to a CommandBarButton. How can I do this? I know CommandBarButton has the method "PasteFace", but this requires the image first copied onto the clipboard. I don't think (can I?) I can load an .ico file directly to clipboard. Any solution? |
Toolbar Button
Hi Gary,
See my page http://www.mvps.org/dmcritchie/excel/toolbars.htm#ico I redid the area after finding that there was a bad link so you have at least one choice now. to get the image to the clipboard such as for Excel toolbar use, this one works for me Icon Sucker 2 http://www.copseystrain.com/iconsucker/index. to create a file such as for documentation in HTML IconXTractor 2.304, http://home.tiscali.de/kurtzimmerman...xtractor_e.htm With both of the above you have to go through the file directories, you cannot directly paste the directory you want when you specify the file. --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "Gary Chan" wrote in message ... Thank you for your reply. but shape object doesn't seem to take .ico files but just bmp files. I have problem with bmp files because when I load a bmp file (by converting from a ico file) to a commandbarbutton the icon is blurred (probably this is a bug) -----Original Message----- Gary, In essence, you need to have the icons as an image somewhere and load the shape. I do this by putting them on a hidden sheet on the workbook that the commandbar is created from, with code somewhat like cbTable.Shapes(shapename).CopyPicture cbCtl.PasteFace where cbTable is the codename of the sheet containing the picture, shapename is the name of the shape, such as 'Picture 30', and cbCtl is an object variable for the control being added. If you want to use the builtin faceids, you would use something like cbCtl.FaceId = faceIdNum -- HTH Bob Phillips "Gary Chan" wrote in message ... I want to load an icon image (.ico file) to a CommandBarButton. How can I do this? I know CommandBarButton has the method "PasteFace", but this requires the image first copied onto the clipboard. I don't think (can I?) I can load an .ico file directly to clipboard. Any solution? . |
Toolbar Button
Bob,
Do you have a "loose trigger finger" or a problem with Outlook (no pun intended). Many of your posts are preceded with a blank response... -- sb "Bob Phillips" wrote in message ... -- HTH Bob Phillips "Gary Chan" wrote in message ... I want to load an icon image (.ico file) to a CommandBarButton. How can I do this? I know CommandBarButton has the method "PasteFace", but this requires the image first copied onto the clipboard. I don't think (can I?) I can load an .ico file directly to clipboard. Any solution? |
All times are GMT +1. The time now is 08:58 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com