JerryDal
09-22-03, 20:59
| I am using a listbox in Excel 2000 for the first time and can't figure out how to save the value selected in a variable and then close the listbox without losing the saved value. My form has the listbox, an OK command button and a CANCEL command button. A command button on a spreadsheet causes the form with the listbox to be displayed. If CANCEL is clicked, I unload the form; no problem. If OK is clicked, the form just sits there. If I click OK and the code behind the OK button closes the form, I can't tell what item was picked on the list because the form and list are no longer available. If I click the OK and assign the value picked to a variable before unloading the form, the value vanishes when the process returns to the initial VBA subroutine (the code behind the spreadsheet command button that opened the form). Thanks for some expert advice. Jerry :rolleyes: |