PC Review


Reply
Thread Tools Rate Thread

Customizing a toolbar wit new icons

 
 
avi
Guest
Posts: n/a
 
      23rd Feb 2009
Hello,

I've seen some third party applications in Excel that create a toolbar
with icons that differ from the faceids provided by Excel

Do you know how is it possible to create such toolbars?

Thanks a lot
Avi

 
Reply With Quote
 
 
 
 
Chip Pearson
Guest
Posts: n/a
 
      23rd Feb 2009
There are basically two ways to do this. You can load a picture from
an external file or you can embed a picture on a worksheet.

Using an external file:
===============
Sub AAA()
Dim Btn As Office.CommandBarButton
Set Btn = Application.CommandBars("Standard"). _
Controls.Add(Type:=msoControlButton, temporary:=True)
With Btn
.Picture = LoadPicture("C:\TestPic.bmp")
.OnAction = "Clicked"
End With
End Sub


Using an embedded picture:
=====================
Sub BBB()
Dim P As Excel.Picture
Dim Btn As Office.CommandBarButton
Set P = Worksheets("Sheet1").Pictures("ThePict")
P.CopyPicture xlScreen, xlBitmap
Set Btn = Application.CommandBars("Standard"). _
Controls.Add(Type:=msoControlButton, temporary:=True)
With Btn
.PasteFace
.OnAction = "Clicked"
End With
End Sub


Both of these procedures will create a new button on the Standard
command bar and apply the picture to the button.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)





On Mon, 23 Feb 2009 09:12:18 -0800 (PST), avi <(E-Mail Removed)>
wrote:

>Hello,
>
>I've seen some third party applications in Excel that create a toolbar
>with icons that differ from the faceids provided by Excel
>
>Do you know how is it possible to create such toolbars?
>
>Thanks a lot
>Avi

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Customizing Toolbar =?Utf-8?B?ZXN0YXJyaW9sMzM=?= Microsoft Outlook Discussion 2 28th Mar 2007 02:00 AM
Customizing the Toolbar =?Utf-8?B?QWxsYUBVVkE=?= Microsoft Outlook Discussion 1 27th Sep 2005 10:09 PM
customizing toolbar Carmen Windows XP Customization 1 25th Sep 2004 08:20 AM
Customizing Toolbar terri Microsoft Excel Programming 1 11th Feb 2004 04:33 PM
customizing IE toolbar Jeffsim Windows XP Internet Explorer 2 31st Dec 2003 04:04 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:08 AM.