View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
John Keith[_2_] John Keith[_2_] is offline
external usenet poster
 
Posts: 175
Default Listbox autosize?

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?

--
Regards,
John