list box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I created a list box using the "Control toolbox" and added items to the list using add.tem. The problem is that each time I closed the application and reopen it I need to go in visual and run the sub user form to get the list to display the names. I can I get the list to display the items in all time?
 
The method used will require to re-populate the list each time you open it.
Either set this procedure up so that it runs as part of the open workbook
event or specify the list by using the controls RowSource property that
points to the data in a range on your worksheet.

Cheers
Nigel

ander said:
I created a list box using the "Control toolbox" and added items to the
list using add.tem. The problem is that each time I closed the application
and reopen it I need to go in visual and run the sub user form to get the
list to display the names. I can I get the list to display the items in all
time?
 
Ander
Add the following code to the workbook, change the FillList with the name of
your procedure.
To do this open the project explorer in VBA editor (<alt> F11) and double
click 'this workbook' in the top left list select workbook (not general)
and it should open a template for the Workbook_Open() event as shown below.
Place the name of your procedure to fill the list box in as shown below.
Now whenevr you open the workbook the procedure will run.


Private Sub Workbook_Open()
Call FillList
End Sub


ander said:
I created a list box using the "Control toolbox" and added items to the
list using add.tem. The problem is that each time I closed the application
and reopen it I need to go in visual and run the sub user form to get the
list to display the names. I can I get the list to display the items in all
time?
 
Back
Top