title: Use string to refer to an array name in vba
body: <p>I have Powerpoint presentation. On each slide I have 8 shapes with text space. They can contain text representing group which has sth related to content/data update and so on.
  I have following arrays which contain users for those responsibility area:</p>
  
  <pre><code>GEN = Array("username_01","username_02","username_03",..."username_xx")
  POL = Array("username_01","username_02","username_03",..."username_xx")
  B2B = Array("username_01","username_02","username_03",..."username_xx")
  RUS = Array("username_01","username_02","username_03",..."username_xx")
  </code></pre>
  
  <p>And this function which is checking if user is in array</p>
  
  <pre><code>   Function IsInArray(stringToBeFound As Variant, arr As Variant) As Boolean
     IsInArray = (UBound(Filter(arr, stringToBeFound)) &gt; -1)
     End Function
  </code></pre>
  
  <p>My problem is that when I want to use the function it works only if I will give the Array name as below:</p>
  
  <pre><code>auser = Environ("UserName")
  IsInArray(auser,GEN) 'it will give me answer if the user is in array
  </code></pre>
  
  <p>I want to get shape text:</p>
  
  <pre><code>res_group_txt = ActivePresentation.Slides(i).Shapes(shape_owner).TextEffect.Text
  </code></pre>
  
  <p>And put it somehow in a function so it will not return an error</p>
  
  <pre><code>auser = Environ("UserName")
  IsInArray(auser,res_group_txt)
  </code></pre>
  
  <p>I have tried to change variables and look through all topics but I have not found answer :(</p>
  
  <p>Help pls :)</p>
  
  <p>BR Misza</p>