Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using VBA in Excel XP and Win 2k
I have several drop down controls on a sheet. The control are NOT ActiveX objects. How do I loop through all the controls on the sheet and set them all to list index 0 (the first choice) Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using VBA in Excel XP and Win 2k.
I have several drop down controls on a sheet. The control are NOT ActiveX objects. How do I loop through all the controls on the sheet and set them all to list index 0 (the first choice)? try this: Sub ResetDropDown() Dim shpDropDown As Shape For Each shpDropDown In ActiveSheet.Shapes If shpDropDown.FormControlType = xlDropDown Then shpDropDown.ControlFormat.ListIndex = 1 End If Next shpDropDown End Sub -- Regards Melanie Breden - Microsoft MVP für Excel - http://excel.codebooks.de (Das Excel-VBA Codebook) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Nesting a sheet name reference within a cell reference??? | Excel Discussion (Misc queries) | |||
Changing sheet reference to cell reference | Excel Worksheet Functions | |||
Control in Chart Sheet | Charts and Charting in Excel | |||
Control Sheet | Excel Worksheet Functions | |||
Syntax to return the value of a control by reference | Excel Discussion (Misc queries) |