Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing font style and color using VBA Spongie Excel Discussion (Misc queries) 3 September 30th 09 08:34 PM
How to stop style for col A changing to style of co D date vs $ Knowledge Seeker Setting up and Configuration of Excel 0 April 15th 08 03:26 PM
Stop UK-style dates changing to US-style dates when mailmerging. Jean XO Excel Discussion (Misc queries) 1 December 20th 07 12:35 PM
Changing from format style to list style B.W. Excel Worksheet Functions 1 November 22nd 06 07:53 PM
Changing the Normal Style Randy Maheux Excel Discussion (Misc queries) 1 December 27th 04 03:13 PM


All times are GMT +1. The time now is 11:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"