When I F1 over ControlFormat it seems that it's both a Property and an
Object, which has something to do with why one case works and the other
doesn't, I think.
How about this instead?:
Sub test()
Dim dd As DropDown
Set dd = Worksheets("sheet1").DropDowns("Drop Down 1")
dd.List = Array("a", "b") ' <-- error line
End Sub
hth,
Doug
"equiangular" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Sub test()
> Dim cf As ControlFormat
> Set cf = Worksheets("sheet1").Shapes("Drop Down 1").ControlFormat
> cf.List = Array("a", "b") ' <-- error line
> End Sub
>
>
> The code works perfectly if i use Worksheets("sheet1").Shapes("Drop Down
> 1").ControlFormat.List = Array("a", "b").
>
> Why this is so?
>
> Thanks.
|