Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Custom Command Bars

I've figured out a way to add custom commands to the ROWS or CELLS
commandbars, but I only seem to be able to add one. Can someone help me
figure out how to add multiple custom commands to one of those command bars?

Thanks,

Barb Reinhardt

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 135
Default Custom Command Bars

Hi,

Copie this in a general module

It's working in Excel 2003 and Excel 2007

'-----------------------------
Sub test()
Dim MBar As CommandBar

Set MBar = Application.CommandBars("Column")
'OR
'Set MBar = Application.CommandBars("Row")
With MBar
With .Controls.Add
.BeginGroup = True
.Caption = "NewCommand1"
.OnAction = "Happy_New_Year"
End With
With .Controls.Add
.Caption = "NewCommand2"
.OnAction = "OK"
End With
End With

End Sub
'-----------------------------
Sub Ok()
MsgBox "Is it working ?"
End Sub
'-----------------------------
Sub Happy_New_Year()
MsgBox "you too"
End Sub
'-----------------------------



"Barb Reinhardt" a écrit dans le message de
groupe de discussion : ...
I've figured out a way to add custom commands to the ROWS or CELLS
commandbars, but I only seem to be able to add one. Can someone help me
figure out how to add multiple custom commands to one of those command bars?

Thanks,

Barb Reinhardt

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
Custom Command Bars barrowhill Excel Discussion (Misc queries) 1 March 29th 08 02:19 PM
Command Bars Bill[_30_] Excel Programming 1 October 5th 05 08:16 PM
Command Bars Neil Hopkinson[_2_] Excel Programming 3 August 19th 05 09:53 AM
Preventing Users from Modifying Custom Command Bars Vlad[_6_] Excel Programming 1 May 24th 04 08:04 PM
command bars Geo Siggy[_16_] Excel Programming 6 April 22nd 04 10:50 AM


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

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"