Drop-down list items are missing after reopen Workbook

C

Compnerd

I am using Control Toolbox, choose the ComboBox, Double click into VB screen,
type the following code:
Private Sub Form_Load()
Combo1.AddItem "Chardonnay"
Combo1.AddItem "Fum Blanc"
Combo1.AddItem "Gewrztraminer"
Combo1.AddItem "Zinfandel"
End Sub
Then click on run sub/user form, then exit out, it popluate the list, save
the Workbook and close it. Then open the same Workbook the the Combobox has
the last item click, but the rest of my list is not showing. I can go into
the VB and find it my list there, if I click on run it will populate the list
again.

Why is my list not saving?
 
P

papou

Hi
Why is my list not saving?
Because it has been created programmatically.
If you want your list to keep its values without using VBA you will have to
place them in your workbook.
HTH
Cordially
Pascal
 
C

Compnerd

I am using list to link to another worksheet, but I do not use sheet names in
my list.
can you give a example or some suggestion.
 
P

papou

Hi
Hum... this needs a little more detail.
Do you mean that the list of items is on another worksheet of the same
workbook?
Or the list is made from items from another Workbook?
You may also consider building your list of items dynamically using an
AutoOpen macro which means that it will automatically create your list when
you open your workbook.
Cordially
Pascal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top