View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Kris Kris is offline
external usenet poster
 
Posts: 58
Default OleObjects and someproperties

Thanks, but it works only if you have object on userform, not on worksheet.
Thanks anyway.


Norman Jones wrote:
Hi Kris,

Try:

Dim combo As msforms.ComboBox


---
Regards,
Norman


"Kris" wrote in message
...

Hi.

I inserted object; combo box

Dim combo As OLEObject

Set combo = ActiveSheet.OLEObjects.Add(ClassType:="Forms.Combo Box.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.