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: 1
Default Menu Controls Index


I have a custom menu bar ("DTSheet") with three popups each of whihc ha
a number of (sub)menu items. Each of the three menu bar popups has a
index which I can find using:

For Each cntrl In CommandBars("DTSheet").Controls
If cntrl.Visible = True Then MsgBox (cntrl.Index)
Next cntrl

However, this only finds the main menu bar controls, it does not fin
the (sub)menu item controls. I had hoped to beat it by using th
following:

For Each cntrl In CommandBars("DTSheet").Controls(1)
If cntrl.Visible = True Then MsgBox (cntrl.Index)
Next cntrl

to find the controls in each menu bar popup in turn. But this return
an "Object does not support this proprty or method" error.

Any help much appreciated

Mic

--
micklloy
-----------------------------------------------------------------------
micklloyd's Profile: http://www.excelforum.com/member.php...fo&userid=3069
View this thread: http://www.excelforum.com/showthread.php?threadid=50483

 
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
Controls in Sheets (Hide etc.) in Format Menu Not appearing Varne Excel Discussion (Misc queries) 8 September 19th 08 04:45 PM
What happened to the index in the Help menu? judanna77 Excel Discussion (Misc queries) 1 December 29th 05 09:53 PM
CommandBars("Worksheet Menu Bar").Controls("Tools").Enabled = Fals Arturo Excel Programming 3 May 26th 05 05:44 PM
Event procedures for controls added with Controls.Add John Austin[_4_] Excel Programming 1 March 9th 05 03:31 PM
Setting Onaction for File Save on Menu bar using item or index numbers David Cuthill Excel Programming 4 December 17th 04 12:44 PM


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