ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Commandbar properties (https://www.excelbanter.com/excel-programming/377126-commandbar-properties.html)

A1pro

Commandbar properties
 
Hello,

I've got this part of a macro

Set cbar = Application.CommandBars.Add(Name:="SendOut", temporary:=True)
cbar.Visible = True
Set cbarcontrol = cbar.Controls.Add(Type:=msoButtonIcon)
With cbarcontrol
.FaceId = 136
.Caption = "SendOut"
.OnAction = "RunWordMacro_Automation"

It creates a toolbar with a button

The only thing I need to do is modify it so it shows not only the icon but
the also a name like SendOut in this case

any ideas ?

TIA

A1pro

Commandbar properties
 
Nevermind

..Style = msoButtonIconAndCaption


"A1pro" wrote:

Hello,

I've got this part of a macro

Set cbar = Application.CommandBars.Add(Name:="SendOut", temporary:=True)
cbar.Visible = True
Set cbarcontrol = cbar.Controls.Add(Type:=msoButtonIcon)
With cbarcontrol
.FaceId = 136
.Caption = "SendOut"
.OnAction = "RunWordMacro_Automation"

It creates a toolbar with a button

The only thing I need to do is modify it so it shows not only the icon but
the also a name like SendOut in this case

any ideas ?

TIA



All times are GMT +1. The time now is 07:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com