LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Add control to commandbar

Hi all

1. I want to add a control before "&Fill Color" on the
Formatting commandbar. I'm stuck and frustrated!

In this effort "After:=FontCtrl" is clearly wrong

Sub Test()
Dim FontCtrl As Object
With Application.CommandBars("Formatting")
Set FontCtrl = .FindControl(Id:=1691)
'1691 is Fill Color ID
'MsgBox FontCtrl.Caption
.Controls.Add(Type:=msoControlButton, _
after:=FontCtrl).Caption = "MyCaption" 'fails
'also .OnAction, .Tag etc
End With
End Sub

2. I've noticed some customized toolbars extend to the
right of the screen. What would be the best approach to
ensure I am neither putting my new control, nor pushing
any others off the screen.

TIA,
Dan
 
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
In-place CommandBar.Add run-time error ARHangel Excel Discussion (Misc queries) 4 October 11th 07 06:17 AM
commandbar problems Richard Cook Excel Discussion (Misc queries) 1 July 8th 05 05:32 PM
Disabling Toolbar buttons and CommandBar items Jim[_20_] Excel Programming 2 August 14th 03 02:33 PM
Commandbar button running macro Kwan Kim Chuen Excel Programming 0 July 27th 03 11:51 AM
Controlling Font Name in a personnal Commandbar Luc Dansereau Excel Programming 0 July 12th 03 07:44 PM


All times are GMT +1. The time now is 03:10 AM.

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

About Us

"It's about Microsoft Excel"