Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Custom Commandbar

Hi

I have created a custom command bar, through code, with a "Window" menu and
controls similar to the "Worksheet Menu Bar" but I cannot get the open and
selected workbooks to show up at the bottom of the custom menu. Is there any
special code or ID to get this to show or is that functionality only within
the built in worksheet menu bar?

Regards,

Stefano


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Custom Commandbar

I assume you want to add control buttons for each visible window in Excel
like the Window menu has.

If you run this code you see the Excel has 10 window placeholders on the
Window toolbar, of type 830, in reserve:

Sub a()
Dim ctrl As CommandBarControl
For Each ctrl In CommandBars("worksheet menu bar") _
.Controls("Window").Controls
Debug.Print ctrl.Caption & " " & ctrl.Visible & " " & ctrl.ID
Next
End Sub

But how they get assigned to particular windows seems to be handled in Excel
and hidden from us because this code doesn't result in anythin real useful:

Sub aa()
With CommandBars("worksheet menu bar") _
.Controls("Tools").Controls _
.Add(msoControlButton, 830)
.Caption = "Book2"
End With
End Sub

Fun to play with though.

--
Jim Rech
Excel MVP
"Stefano Condotta" wrote in message
news:C_oVd.557862$8l.499479@pd7tw1no...
| Hi
|
| I have created a custom command bar, through code, with a "Window" menu
and
| controls similar to the "Worksheet Menu Bar" but I cannot get the open and
| selected workbooks to show up at the bottom of the custom menu. Is there
any
| special code or ID to get this to show or is that functionality only
within
| the built in worksheet menu bar?
|
| Regards,
|
| Stefano
|
|


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Custom Commandbar

Thank you very much Jim. I should be able to manipulate that code to
suit my needs.

Regards,

Stefano Condotta



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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
How to exchange Custom Commandbar buttons between PC's? Frank Van Eygen[_2_] Excel Discussion (Misc queries) 3 April 10th 09 01:01 PM
CommandBar Controls Simon Shaw[_5_] Excel Programming 3 December 28th 04 05:05 PM
Value of ComboBox on Custom CommandBar Kevin Excel Programming 4 January 15th 04 10:25 PM
commandbar Greg Prost[_2_] Excel Programming 2 November 21st 03 11:42 AM
Add control to commandbar Dan[_20_] Excel Programming 2 August 27th 03 04:47 PM


All times are GMT +1. The time now is 04:04 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"