Saqib Husain
asked on
Userform Listbox selection does not go away
I have attached this flashcard application which asks for two responses for each question (in listboxes) and moves on only when both answers are correct.
When both answers are correct the list is cleared and repopulated but the last selection does not go away.
Please help me get rid of the listbox selection once the lists are repopulated.
Listbox-problem.xls
When both answers are correct the list is cleared and repopulated but the last selection does not go away.
Please help me get rid of the listbox selection once the lists are repopulated.
Listbox-problem.xls
Either set both Listbox1.ListIndex and Listbox2.Listindex to -1 or unload and reload the userform
ASKER
I had tried the -1 but to no avail.
How do I unload and reload the userform1?
How do I unload and reload the userform1?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Saqib,
If i do this in your new word code..
For me it don't select anything anymore in the listbox2..Now i'm not sure what you are trying to do here.. but it didnt had anything selected their..
Also i will change your newword which is called by userform activate to userform initialize.. so that it calls only when it loads otherwise dont call it everytime i select the userform or it becomes active..
Saurabh...
If i do this in your new word code..
ListBox2.ListIndex = -1
For me it don't select anything anymore in the listbox2..Now i'm not sure what you are trying to do here.. but it didnt had anything selected their..
Also i will change your newword which is called by userform activate to userform initialize.. so that it calls only when it loads otherwise dont call it everytime i select the userform or it becomes active..
Saurabh...
ASKER
This worked. Thanks
You're welcome and I'm glad I was able to help.
In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2015, Experts-Exchange Top Expert Visual Basic Classic 2012 to 2014
In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2015, Experts-Exchange Top Expert Visual Basic Classic 2012 to 2014