Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
personal commandbars
Is it possible to have icons on the personalized toolbars instead of "text"?
As in the following sample, how to replace the text "internet" under caption with a small icon image "such as internet.bmp or gif or jpeg" Set myControl = Application.ActiveExplorer.CommandBars("ToolbarOL" ).Controls.Add(Type:=msoControlButton) With myControl .Caption = "internet" .Visible = True .OnAction = "GetOnline" .Style = msoButtonCaption End With -- Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
personal commandbars
Jackie
Here's an example With .Controls.Add(Type:=msoControlButton, befo=.Controls.Count + 1) .Caption = "Trim Google URL" .TooltipText = .Caption .OnAction = "Myfunctions.xla!Module2.ShowTrim" .Visible = True Sheet2.Shapes("Picture 1").Copy .PasteFace End With The icon is stored as a picture on Sheet2 and is copied. PasteFace is used to apply the icon to the commandbarbutton. Don't set the Style or set it as msoButtonIcon to get the icon to show instead of text. The example comes from here http://www.dicks-blog.com/excel/2004..._commandb.html -- Dick Kusleika MVP - Excel Excel Blog - Daily Dose of Excel www.dicks-blog.com "Jackie" wrote in message ... Is it possible to have icons on the personalized toolbars instead of "text"? As in the following sample, how to replace the text "internet" under caption with a small icon image "such as internet.bmp or gif or jpeg" Set myControl = Application.ActiveExplorer.CommandBars("ToolbarOL" ).Controls.Add(Type:=msoCo ntrolButton) With myControl .Caption = "internet" .Visible = True .OnAction = "GetOnline" .Style = msoButtonCaption End With -- Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Lock Commandbars | Excel Programming | |||
Commandbars | Excel Programming | |||
CommandBars | Excel Programming | |||
CommandBars | Excel Programming | |||
Built In CommandBars | Excel Programming |