BrianExcel
Well-known Member
- Joined
- Apr 21, 2010
- Messages
- 975
I am building a workbook as an add-in that will provide specific site information such as address, phone, etc.
I'd prefer to not store that data in a sheet, and instead would like to store it in VBA, since it doesn't change.
What's the best way to do that? In an ideal world, I'd love to write a statement of some kind that has all the data in a single line, and then reference it's location in that line through code.
So, if "Chicago" was location 1, and "Dallas" was location 2, an example of the data would be:
1234 Main Street, Chicago, Illinois, 60050, 815-555-5555
5678 Main Street, Dallas, TX, 75231, 214-555-5555
Then in the code, if I wanted to reference the State for the "Chicago" entry, I would call line 1, variable 3. If I wanted to reference the phone number for the "Dallas" entry, I would call Line 2, variable 4, and so on.
Any thoughts on the best way to do that? or any suggestions?
I'd prefer to not store that data in a sheet, and instead would like to store it in VBA, since it doesn't change.
What's the best way to do that? In an ideal world, I'd love to write a statement of some kind that has all the data in a single line, and then reference it's location in that line through code.
So, if "Chicago" was location 1, and "Dallas" was location 2, an example of the data would be:
1234 Main Street, Chicago, Illinois, 60050, 815-555-5555
5678 Main Street, Dallas, TX, 75231, 214-555-5555
Then in the code, if I wanted to reference the State for the "Chicago" entry, I would call line 1, variable 3. If I wanted to reference the phone number for the "Dallas" entry, I would call Line 2, variable 4, and so on.
Any thoughts on the best way to do that? or any suggestions?