Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default 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?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default 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?





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default 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?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
toolbar button Dennis S. Excel Discussion (Misc queries) 5 July 9th 08 03:52 AM
Toolbar button fda secretary Excel Discussion (Misc queries) 1 October 22nd 07 09:41 PM
Button with macro in toolbar Daniel Charts and Charting in Excel 1 August 25th 07 02:39 AM
New button on toolbar attaboy Excel Worksheet Functions 5 January 23rd 07 04:17 PM
Sum Button Toolbar Rugdoody Excel Discussion (Misc queries) 3 May 20th 06 12:38 AM


All times are GMT +1. The time now is 04:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"