Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Creating sub menu in Command bar


Hi - first post so not sure if replying to a related thread is the best
way to post this question. Anyway:

On a related issue, I have set up menus with menu items (buotons,
popups, dropdowns,etc). I want to reference these controls elsewhere
(in different modules) and the variable names created with Set appear
to be lost (out of context). I can however refer to the controls index
number. Problem is I can only get index numbers (using FindControl) for
the controls at the menu level. It does not pickup menu items. Any way
around this? Thanks


--
micklloyd
------------------------------------------------------------------------
micklloyd's Profile: http://www.excelforum.com/member.php...o&userid=30696
View this thread: http://www.excelforum.com/showthread...hreadid=383809

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Creating sub menu in Command bar

If using xl2000 or later, use FindControls with an "s"

see Office VBA help for details.

--
Regards,
Tom Ogilvy

"micklloyd" wrote
in message ...

Hi - first post so not sure if replying to a related thread is the best
way to post this question. Anyway:

On a related issue, I have set up menus with menu items (buotons,
popups, dropdowns,etc). I want to reference these controls elsewhere
(in different modules) and the variable names created with Set appear
to be lost (out of context). I can however refer to the controls index
number. Problem is I can only get index numbers (using FindControl) for
the controls at the menu level. It does not pickup menu items. Any way
around this? Thanks


--
micklloyd
------------------------------------------------------------------------
micklloyd's Profile:

http://www.excelforum.com/member.php...o&userid=30696
View this thread: http://www.excelforum.com/showthread...hreadid=383809



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Creating sub menu in Command bar


Thanks Tom

FindControls only seems to work for all commandbars as follows (Office
VBA help as suggested):

"Set cntrls = CommandBars.FindControls(Type:=msoControlDropdown) "

but not on an individual commandbar such as:

"Set cntrls =
CommandBars("DTSheet").FindControls(Type:=msoContr olDropdown)"

It replies with a "Method or data member not found".

Regards
Mick


--
micklloyd
------------------------------------------------------------------------
micklloyd's Profile: http://www.excelforum.com/member.php...o&userid=30696
View this thread: http://www.excelforum.com/showthread...hreadid=383809

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
Macros and Menu Command mary Excel Discussion (Misc queries) 2 September 7th 07 07:00 PM
Creating sub menu in Command bar Troispieds Excel Programming 5 June 20th 07 05:23 PM
Name command in Insert Menu Ahmad Wali Zahid Excel Discussion (Misc queries) 1 January 31st 06 08:37 AM
Command Bar Menu - Management kraljb[_2_] Excel Programming 2 October 26th 04 04:57 PM
Execute a menu command with VBA? Susan[_3_] Excel Programming 2 May 1st 04 07:45 AM


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