Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
Is there an equivalent to FindControl for a submenu item? E.g., in the following code, I'd like the last line to be something like Set cbarbutton = cbarcontrol.FindControl(ID:=542): Sub test() Dim cbar As CommandBar Dim cbarcontrol As CommandBarControl Dim cbarbutton As CommandBarButton Set cbar = CommandBars("Format") Set cbarcontrol = cbar.FindControl(ID:=30025) Set cbarbutton = cbarcontrol.Controls("Width...") End Sub Thanks, Doug Glancy |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Doug,
The Recursive argument specifies that the search extend to the subbars. Set cbarcontrol = cbar.FindControl(ID:=542, Recursive:=True) -- John Green Sydney Australia "Doug Glancy" wrote in message ... Hello, Is there an equivalent to FindControl for a submenu item? E.g., in the following code, I'd like the last line to be something like Set cbarbutton = cbarcontrol.FindControl(ID:=542): Sub test() Dim cbar As CommandBar Dim cbarcontrol As CommandBarControl Dim cbarbutton As CommandBarButton Set cbar = CommandBars("Format") Set cbarcontrol = cbar.FindControl(ID:=30025) Set cbarbutton = cbarcontrol.Controls("Width...") End Sub Thanks, Doug Glancy |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks John.
"John Green" wrote in message ... Doug, The Recursive argument specifies that the search extend to the subbars. Set cbarcontrol = cbar.FindControl(ID:=542, Recursive:=True) -- John Green Sydney Australia "Doug Glancy" wrote in message ... Hello, Is there an equivalent to FindControl for a submenu item? E.g., in the following code, I'd like the last line to be something like Set cbarbutton = cbarcontrol.FindControl(ID:=542): Sub test() Dim cbar As CommandBar Dim cbarcontrol As CommandBarControl Dim cbarbutton As CommandBarButton Set cbar = CommandBars("Format") Set cbarcontrol = cbar.FindControl(ID:=30025) Set cbarbutton = cbarcontrol.Controls("Width...") End Sub Thanks, Doug Glancy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Add XML submenu | Excel Discussion (Misc queries) | |||
XML submenu | Excel Discussion (Misc queries) | |||
Findcontrol | Excel Programming | |||
FindControl ?!? | Excel Programming | |||
Removing the RECENTLY OPENED submenu item | Excel Programming |