Jennifer has attended:
Excel VBA Intro Intermediate course
Userforms
I am trying to set up a macro with user input, where they can choose one of several options (countries), each country chosen is then used as a variable in the macro (ie. country1, country2 etc). I have set up a checklist on a userform, but I'm not sure how to transfer the checked options to the main macro from the form.
RE: userforms
Hi Jeniffer
The simplest way to do it is to create Public variables in the macro to receive the values from the form.
You could create the variables as an Array eg.
Public Country(5) as Variant .
This will hold 6 values. Now when the countries are selected in the form their names are place in the Array.
Attached is an excel sheet that shows some check boxes that when clicked will add a country name to the array.
Hope it helps
Carlos