Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combo Box Changes When Opening Workbook
I have a combo box that is populated by using the ListFillRange property.
When selecting the combo box item ("product"), the price is displayed in the next column. Pretty straightforward. But, there are several products with the same price. If I select a product with the same price as another product, save the workbook, and the close it, the next time I open the workbook the text in the combo box changes to the first product with the same price. How do I keep this from happening? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combo Box Changes When Opening Workbook
If these items do not change, populate the Combobox with the
Workbook_Activate event and reference the cell containing the price with the ..additem property instead of using the ListFillRange property. This way you can control the order the products show up in the combobox. net_prof "JP" wrote: I have a combo box that is populated by using the ListFillRange property. When selecting the combo box item ("product"), the price is displayed in the next column. Pretty straightforward. But, there are several products with the same price. If I select a product with the same price as another product, save the workbook, and the close it, the next time I open the workbook the text in the combo box changes to the first product with the same price. How do I keep this from happening? Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combo Box Changes When Opening Workbook
the items really don't change but the order is not what is giving me the
trouble. I'll save the product name in the combo box but when opening the workbook at a later time, i'll see the product i selected for a brief second and then it switches to the product name which has the same price as the one I selected in the first place. "Net_prof" wrote: If these items do not change, populate the Combobox with the Workbook_Activate event and reference the cell containing the price with the .additem property instead of using the ListFillRange property. This way you can control the order the products show up in the combobox. net_prof "JP" wrote: I have a combo box that is populated by using the ListFillRange property. When selecting the combo box item ("product"), the price is displayed in the next column. Pretty straightforward. But, there are several products with the same price. If I select a product with the same price as another product, save the workbook, and the close it, the next time I open the workbook the text in the combo box changes to the first product with the same price. How do I keep this from happening? Thanks |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combo Box Changes When Opening Workbook
I have not set the controlsource. I don't see that as an item in the
properties window though. "Net_prof" wrote: Have you defined the .ControlSource property for the combobox? I believe if you only define the ListFillRange and do not define the ControlSource, your list value will get reset every time you reinitialize the control (i.e. reopen the form or workbook/sheet). But I like to have better control, so I avoid using ListFillRange and just use the .AddItem or .List() to populate either Combobox or Listbox controls, then define the ControlSource property where I want to save for next time if I want to retrieve a previously selected value from the list. "JP" wrote: the items really don't change but the order is not what is giving me the trouble. I'll save the product name in the combo box but when opening the workbook at a later time, i'll see the product i selected for a brief second and then it switches to the product name which has the same price as the one I selected in the first place. "Net_prof" wrote: If these items do not change, populate the Combobox with the Workbook_Activate event and reference the cell containing the price with the .additem property instead of using the ListFillRange property. This way you can control the order the products show up in the combobox. net_prof "JP" wrote: I have a combo box that is populated by using the ListFillRange property. When selecting the combo box item ("product"), the price is displayed in the next column. Pretty straightforward. But, there are several products with the same price. If I select a product with the same price as another product, save the workbook, and the close it, the next time I open the workbook the text in the combo box changes to the first product with the same price. How do I keep this from happening? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
combo box - opening a workbook | Excel Discussion (Misc queries) | |||
Combo box list w/ data in 2nd workbook without opening both files | Excel Worksheet Functions | |||
excel VBA problem - setting workbook as variable & opening/re-opening | Excel Programming | |||
How to make the opening of a workbook conditional upon the opening of another workbook | Excel Programming | |||
How to make opening of workbook conditional of opening of another workbook | Excel Programming |