![]() |
Drop-down list items are missing after reopen Workbook
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? |
Drop-down list items are missing after reopen Workbook
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 "Compnerd" a écrit dans le message de news: ... 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? |
Drop-down list items are missing after reopen Workbook
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 "Compnerd" a écrit dans le message de news: ... 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. "papou" wrote: 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 "Compnerd" a écrit dans le message de news: ... 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? |
All times are GMT +1. The time now is 08:45 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com