Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing the Style of a Combobox Via It's Name
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Changing font style and color using VBA | Excel Discussion (Misc queries) | |||
How to stop style for col A changing to style of co D date vs $ | Setting up and Configuration of Excel | |||
Stop UK-style dates changing to US-style dates when mailmerging. | Excel Discussion (Misc queries) | |||
Changing from format style to list style | Excel Worksheet Functions | |||
Changing the Normal Style | Excel Discussion (Misc queries) |