![]() |
Last line selected in ComboBox
Win XP, Excel 2003
On my form there's a Combo Box with shows the first only of 7 optional selections in the initial mode, and all 7 in the drop down mode. When one (say the second entry) is selected, it does something and the form's dismissed. How can I arrange matters so that when the form is recalled, it shows the last selected entry in the initial mode, rather than the first. donwb |
Last line selected in ComboBox
Assuming you meant UserForm when you said "form"... place the ComboBox's
ListIndex property value in the control's Click event in a "global" location (an cell on the worksheet if you want the index number to survive when the workbook is closed; a variable Dim'med in the (General)(Declaration) section of the UserForm's code window if you only need to keep it available while the UserForm is open) and assign this value back to the ListIndex when you Initialize the UserForm. -- Rick (MVP - Excel) "donwb" wrote in message ... Win XP, Excel 2003 On my form there's a Combo Box with shows the first only of 7 optional selections in the initial mode, and all 7 in the drop down mode. When one (say the second entry) is selected, it does something and the form's dismissed. How can I arrange matters so that when the form is recalled, it shows the last selected entry in the initial mode, rather than the first. donwb |
Last line selected in ComboBox
Thanks Rick
"Rick Rothstein" wrote in message ... Assuming you meant UserForm when you said "form"... place the ComboBox's ListIndex property value in the control's Click event in a "global" location (an cell on the worksheet if you want the index number to survive when the workbook is closed; a variable Dim'med in the (General)(Declaration) section of the UserForm's code window if you only need to keep it available while the UserForm is open) and assign this value back to the ListIndex when you Initialize the UserForm. -- Rick (MVP - Excel) "donwb" wrote in message ... Win XP, Excel 2003 On my form there's a Combo Box with shows the first only of 7 optional selections in the initial mode, and all 7 in the drop down mode. When one (say the second entry) is selected, it does something and the form's dismissed. How can I arrange matters so that when the form is recalled, it shows the last selected entry in the initial mode, rather than the first. donwb |
All times are GMT +1. The time now is 11:25 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com