Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
FindControl ?!?
Hi
The FindControl returns the first element or Nothing, if no control was found. But I want to find all controls, that are available. How to do? Tom |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
FindControl ?!?
Tom,
It isn't clear what you are trying to do, but Office 2000 and later supports the FindControls method that will return a collection of controls. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Tom" wrote in message ... Hi The FindControl returns the first element or Nothing, if no control was found. But I want to find all controls, that are available. How to do? Tom |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
FindControl ?!?
Chip
I need to find all sorting buttons (IDs 210, 211, 1209, 6687) that are in the toolsbars of Excel. In a second step the enabled-property of all these controls must be set to false. The tool should work for Excel 97, 2000, XP & 2003. Tom "Chip Pearson" schrieb im Newsbeitrag ... Tom, It isn't clear what you are trying to do, but Office 2000 and later supports the FindControls method that will return a collection of controls. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Tom" wrote in message ... Hi The FindControl returns the first element or Nothing, if no control was found. But I want to find all controls, that are available. How to do? Tom |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
FindControl ?!?
Hi Tom
This will work in 97-2003 Sub menuItem_EnabledFalse() Dim a As Integer On Error Resume Next For a = 1 To Application.CommandBars.Count For Each ctl In CommandBars(a).Controls Application.CommandBars(a).FindControl(Id:=210, Recursive:=True).Enabled = False Next ctl Next a End Sub Sub menuItem_EnabledTrue() Dim a As Integer On Error Resume Next For a = 1 To Application.CommandBars.Count For Each ctl In CommandBars(a).Controls Application.CommandBars(a).FindControl(Id:=210, Recursive:=True).Enabled = True Next ctl Next a -- Regards Ron de Bruin (Win XP Pro SP-1 XL2000-2003) www.rondebruin.nl "Tom" wrote in message ... Chip I need to find all sorting buttons (IDs 210, 211, 1209, 6687) that are in the toolsbars of Excel. In a second step the enabled-property of all these controls must be set to false. The tool should work for Excel 97, 2000, XP & 2003. Tom "Chip Pearson" schrieb im Newsbeitrag ... Tom, It isn't clear what you are trying to do, but Office 2000 and later supports the FindControls method that will return a collection of controls. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Tom" wrote in message ... Hi The FindControl returns the first element or Nothing, if no control was found. But I want to find all controls, that are available. How to do? Tom |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|