Hi all
You probably know that I'm much into Excel / VBA (duh!), but also and sometimes even more: I love soccer. By now I've made a few spreadsheets to track the (amateur) competitions my (3) teams play in. They're on my site. But here's a new tool I'm working on.
All these teams are amateuristic and somehow need to set the playing formation each week/game. The list of players in the team is given (but could change during season). For the rest, I was thinking of making a userform to drag and drop players to a position on the field. Soccer fans know the most common systems: 4-4-2 (defenders - midfielders - strikers), 3-5-2, 4-3-3, ... I would like to let the user choose the system and positions will adjust. I'd also like to let the user draw his own system and save that for later reference.
Now, to cut a long story short, I've made an attempt. I have progressed steadily, the preliminary result looks like this:
At the moment, the userform has also some Dutch but (neglect that if you don't understand it). Now you know why I've been posting little the last week...
I've used class modules, and events like mousemove, doubleclick, beforedroporpaste and beforedragover. Also, sorting a multicolumn listbox on 2 columns. Quite nice code, more difficult than I ever wrote I think.
The user can move the player's name into an invisible label just below a position. Doubleclick on the label will put it back in the list, sorted.
That said, for those of you interested in this challenge, could you please have a look at the picture and pass on any comments. Be it graphically, how you'd approach it, must-have's, do's & don'ts, general remarks, ... Perhaps it could be extended afterwards to other sports.
Wigi