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

Using XL2003, I have a custom command bar in workbook. The command bar
contains a menu that when expanded presents the user with a variety of
options to select ("All Levels","Next Level", "Bottom Level"). My problem is
figuring out how to make the options behave similar to the "Formula Bar" and
"Status Bar" options under the View menu. Only one option should be able to
be selected at a time and I will need to a way to check which option is
selected to provide to another procedure as a parameter. Thanks in advance
for your help.

-Cory
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 638
Default Custom Command Bar Options

You can use the ActionControl property of the CommandBars collection
to figure out which button was pushed. For example, to make a button
cycle through a pressed/unpressed state, you could use:
If CommandBars.ActionControl.State = msoButtonDown Then
CommandBars.ActionControl.State = msoButtonUp
Else
CommandBars.ActionControl.State = msoButtonDown
End If

You can also pass the caption as well. You can then use the caption
as the paramater in an If statement or Select Case statement to run
the appropriate code.

If I misunderstood your question and gave you completely irrelevant
information, I appologize.

Hope this helps.


Cory wrote:
Using XL2003, I have a custom command bar in workbook. The command bar
contains a menu that when expanded presents the user with a variety of
options to select ("All Levels","Next Level", "Bottom Level"). My problem is
figuring out how to make the options behave similar to the "Formula Bar" and
"Status Bar" options under the View menu. Only one option should be able to
be selected at a time and I will need to a way to check which option is
selected to provide to another procedure as a parameter. Thanks in advance
for your help.

-Cory


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
Print command options scarrigan Excel Discussion (Misc queries) 1 October 20th 08 08:42 PM
If command with 3 options Kevin Porter Excel Programming 1 February 14th 07 10:35 PM
further options following a command button click thesaxonuk Excel Discussion (Misc queries) 0 October 23rd 06 01:46 PM
Excel Command Line Options mr tom Excel Programming 3 September 7th 05 04:31 PM
Command line options R Avery Excel Programming 4 October 21st 04 10:10 PM


All times are GMT +1. The time now is 05:00 PM.

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"