userform order

drltr6

New member
Joined
Oct 25, 2011
Messages
22
Reaction score
0
Points
0
Excel Version(s)
MAC 2011
Is there a way to have the names listed in a userform placed in the order in which they are chosen in the userform? For example, I have 10 names of people listed in a userform. I want the user to check the 5 or 6 names chosen and place them in the order that they were checked.
 

Ken Puls

Administrator
Staff member
Joined
Mar 13, 2011
Messages
2,522
Reaction score
6
Points
38
Location
Nanaimo, BC, Canada
Website
www.excelguru.ca
Excel Version(s)
Excel Office 365 Insider
The only way I can think of that you could do this is to set up a checkbox for each item, then code the CheckBox#_Click events for them, trying to track the order. You'd end up having to fight the logic through as to when they reset, so it may be kind of awkward.
 

Bob Phillips

Super Moderator
Staff member
Joined
Mar 21, 2011
Messages
1,940
Reaction score
0
Points
36
Excel Version(s)
O365
You could always use the Listbox Click event to add each selection to an array and then use that.
 

Ken Puls

Administrator
Staff member
Joined
Mar 13, 2011
Messages
2,522
Reaction score
6
Points
38
Location
Nanaimo, BC, Canada
Website
www.excelguru.ca
Excel Version(s)
Excel Office 365 Insider
You still have to worry about what point the array gets reset though, right? What I mean is that: the user click 2, 3, 4, then realizes they screwed up and wanted 5, 2, 3. How do you deal with that. I guess you could have a reset button on the form...
 
Top