I have an excel sheet with a commandbutton on it. Whever a user clicks it, a userform pops up with a combobox. I would like to populate the combobox by looping through a collection of items. Since I will need the items further on (for example, when the user clicks the button again), I thought it would be a good idea to read the items once from a sourcefile when the workbook opens (workbook_open), and make it a public/global collection, so all subs, functions and userforms can use the collection without having to re-read the sourcefile over and over.
so far I have created a public/global collection (in ThisWorkBook), but the userform does not recognize the variable when I try to use it. can anyone help?
so far I have created a public/global collection (in ThisWorkBook), but the userform does not recognize the variable when I try to use it. can anyone help?