I have a list of countries in the worksheet, with different things (capital, flag etc.) associated with it. What I would like to do is create a geography "game" where a Userform appears and 10 flags & 10 countries names are randomly selected from the list of 200+ entrances. They are listed in 2 columns of the Userform and the player must drag the flag besides the (appropriate) country name.
What I have thought is create a new object, e.g. named Country, where the properties would be name & capital (as strings), flag (image), population etc.
Where I would need help is 3 points ;
(1) can a circular image (the flag, in our case) have "Drag & Drop" behavior activated or somehow set ?
(2) the selected image to be dragged-dropped is the Country.Image for the "correct country" (which is one of the 10). So, somehow I need to make the code recognize if the specific image is the one linked to the specific country. What kind of criteria would actually help the code recognize what is what and materialize this step ?
(3) because there are over 200+ countries I would need to describe step #2 (above) with a procedure and pass the image value in it, e.g. sub determine_flag, with 2 variables, one for the image and the other one for the country.
Like ;
sub determine_flag(French_flag, Denmark) would be a wrong answer (like "False"), while
sub determine_flag(French_flag, France) would produce a correct answer (like "True").
How can I implement the image in it, e.g. through the filename ? As a form control ? As image ? How do we describe it ?
I mean when the image is clicked (OnClick), with or without Drag&Drop following, ... what sort of information does this produce for us code-wise ?
Maybe my inexperience makes me miss something even from the planning stage. I'm not necessarily expecting to get the code complete but any directions would help, even as food for thought.
Thank you in advance.
What I have thought is create a new object, e.g. named Country, where the properties would be name & capital (as strings), flag (image), population etc.
Where I would need help is 3 points ;
(1) can a circular image (the flag, in our case) have "Drag & Drop" behavior activated or somehow set ?
(2) the selected image to be dragged-dropped is the Country.Image for the "correct country" (which is one of the 10). So, somehow I need to make the code recognize if the specific image is the one linked to the specific country. What kind of criteria would actually help the code recognize what is what and materialize this step ?
(3) because there are over 200+ countries I would need to describe step #2 (above) with a procedure and pass the image value in it, e.g. sub determine_flag, with 2 variables, one for the image and the other one for the country.
Like ;
sub determine_flag(French_flag, Denmark) would be a wrong answer (like "False"), while
sub determine_flag(French_flag, France) would produce a correct answer (like "True").
How can I implement the image in it, e.g. through the filename ? As a form control ? As image ? How do we describe it ?
I mean when the image is clicked (OnClick), with or without Drag&Drop following, ... what sort of information does this produce for us code-wise ?
Maybe my inexperience makes me miss something even from the planning stage. I'm not necessarily expecting to get the code complete but any directions would help, even as food for thought.
Thank you in advance.