title: VBA Dictionary References
body: <p>I am not a professional programmer, but reasonably proficient in VBA. I currently am writing a program to analyze a large database. When I find the area in the database that needs further analysis and potential correction, my desired approach is to collect the necessary data in a number of dictionaries with a common structure. </p>
  
  <p>While I can declare the dictionaries with early binding, I need a way to reference each dictionary with a variable name I can then use to create a loop to quickly analyze all the information I collected. Ideally, I would want to name the dictionaries something like A1, A2, A3, etc. and then just create a loop where I increment through the numerical part of the name as all the data in each dictionary is analyzed/corrected in the same manner.</p>
  
  <p>While I know indirect references cannot be used in standard VBA, it is possible to use Object Variables for each of the dictionaries. However, Object Variables themselves to not appear to have the flexibility to have a variable structure. This appears possible with some objects like WorkSheets, where the variable name can be defined in parentheses behind WorkSheets (i.e. WorkSheets("A1")), but does not appear possible for dictionaries, collections, arraylists, or any other type of storage mechanism I might use.</p>
  
  <p>I can do what I want to do by creating nested dictionaries and some cobbled up names for the keys. I have some data which would require a different dictionary item for the same key value. Thus I need to create different "versions" of the same key. Needless to say, while this approach can work, the analysis would be much simpler if I could just loop through the names. </p>
  
  <p>Hopefully, I described my problem adequately. Am I totally out of luck in what I am trying to do or does someone have an idea on how to achieve this? Thanks much!</p>