title: VBA how to use a variable string to call a variable or function?
body: <p>I have form inputs called "text1, text2, text2..."  and I have an array of strings to fill the inputs with...  </p>
  
  <p>What I want is this....</p>
  
  <pre><code>text1.Value = Invoice.input(1)
  text2.Value = Invoice.input(2)
  text3.Value = Invoice.input(3)
  </code></pre>
  
  <p>but this seems like a lot of typing for something I know can be done with a simple for loop..  </p>
  
  <pre><code>for loop = 1 To loop = 50 
   text+i.Value = Invoice.input(i)
  next loop 
  </code></pre>
  
  <p>how can I use text+i to call my var which is actually called text1?</p>
  
  <p>When doing a Google search a few people said to use the Eval() function but this didn't work for me.</p>
  
  <p>Thanks. </p>