Hi.
I inserted object; combo box
Dim combo As OLEObject
Set combo = ActiveSheet.OLEObjects.Add(ClassType:="Forms.ComboBox.1",
Link:=False, DisplayAsIcon:=False, Left:=100, Top:=100.Top, Width:=96,
Height:=18)
I can set some of the properties
combo.LinkedCell = "$g$6"
but I also have to set ColumnCount and ColumnWidth properties of
combobox. I can do that manually, but they are not listed as a
properties in VBA
Ho to do that from VBA?
Thanks.
Norman Jones - 23 Jan 2006 23:06 GMT
Hi Kris,
Try:
Dim combo As msforms.ComboBox
---
Regards,
Norman
> Hi.
>
[quoted text clipped - 16 lines]
>
> Thanks.
Kris - 24 Jan 2006 03:02 GMT
Thanks, but it works only if you have object on userform, not on worksheet.
Thanks anyway.
> Hi Kris,
>
[quoted text clipped - 26 lines]
>>
>>Thanks.
Chip Pearson - 23 Jan 2006 23:15 GMT
Use
combo.Object.ColumnCount = 2

Signature
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
> Hi.
>
[quoted text clipped - 18 lines]
>
> Thanks.
Kris - 24 Jan 2006 02:58 GMT
> Use
>
> combo.Object.ColumnCount = 2
This is it.
So simple solutions are so difficult to find.