![]() |
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 |
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 |
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 |
All times are GMT +1. The time now is 03:02 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com