I have a form named PickAMonth with a listbox control named lstMonthlyTabs.
I am assigning an array to the List property which works fine, but the next
two lines cause errors...
PickAMonth.lstMonthlyTabs.List = vaWksNames
PickAMonth.lstMonthlyTabs.AutoSize True
PickAMonth.AutoSize True
Tried them both with = or := to set the true value but I still get the
error: Method or data member not found; the ".AutoSize" is highlited when
the error is produced. This is a form created inside the VB editor (not the
forms toolbar from excel)
I am running Office2003 using excel's VBA to control the form.
How do I automatically size my listbox and form to match the data size?

Signature
Regards,
John
JLGWhiz - 28 Apr 2008 21:27 GMT
The correct syntax for the AutoSize is :
myObject.AutoSize = True
However, it looks as though MS chose not to include the ListBox as one of
the objects that the AutoSize property would apply to. You will have to use
Height and Width to size the ListBox.
> I have a form named PickAMonth with a listbox control named lstMonthlyTabs.
> I am assigning an array to the List property which works fine, but the next
[quoted text clipped - 11 lines]
> I am running Office2003 using excel's VBA to control the form.
> How do I automatically size my listbox and form to match the data size?