Changing the Style of a Combobox Via It's Name
You can do this via the OLEObjects collection for the sheet, e.g:
Private Sub SetStyleCombo(sComboBoxName as String)
Worksheets("Sheet1").OLEObjects(sComboBoxName).Obj ect.Style =
fmStyleDropDownCombo
End Sub
Hope this helps,
Paul
"Kent" wrote in message
...
I have multiple comboboxes addes to a worksheet. I would like to write a
subroutine that changes the style property of the combobox. I want to
reference the combobox by its name that is passed as a parameter to the
subroutine. I can't seem to write the code that references the combobox by
this passed parameter name.
Thanks,
Kent
|