Load a range into an array for Userforms

Joined
Mar 19, 2011
Messages
1
Reaction score
0
I have a range "UserIDs" in a worksheet that I want to load an reference throughout a whole project. It's 2 columns and I will need to use both columns.

I've been looking at the best ways to do this I think what I need is to declare it as a public array.

So now my questions are as follows. How do I load it on workbook open? How do I declare it as a public array? How do I reference the 2nd value when I need to read it?

For example John opens the workbook, the first procedure calls the range and assigns it to the array and get's the b column value that matches John's userid, i.e. john (a column value), 3 (b column value). This then populates several userforms according to the rules set up by the "3" value. Other procedures would read his name "John" to populate several msg boxes.

My last question is, am I going about this in the right way or is there some better way to do it?
 
Back
Top