View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default CombBox - Object of What Collection?

Juan gave you the code for comboboxes on a Userform.

for comboboxes from the control toolbox toolbar on a worksheet

Dim cbox as MSForms.Combobox
for each oleobj in Activesheet.OleObjects
if typeof oleObj.Object is MSForms.Combobox then
set cbox = oleObj.Object
cbox.Value = cbox.list(cbox.listcount-1)
end if
Next


for dropdowns from the Forms toolbar

Dim ddown as DropDown
for each dDown in ActiveSheet.DropDowns
dDown.Value = dDown.list(dDown.Listcount)
Next

Then there are dropdowns associated with data validation.

--
Regards,
Tom Ogilvy





"George" wrote in message
...
What Collection are ComboBoxes objects of? So that they can be accessed to

perfom a modification on each ComboBox in the application via a For Each
Next loop?