title: Accessing Public Variant Array from Module
body: <p>Say I have two files Form1.frm and Module1.bas in a Visual Basic 6 project.</p>
  
  <p>Form1.frm:</p>
  
  <pre><code>Public myArray As Variant
  
  Private Sub Form_Load()
    ReDim myArray(2)
    Call PopulateArrays
  End Sub
  </code></pre>
  
  <p>Module1.bas:</p>
  
  <pre><code>Public Sub PopulateArrays()
  Form1.myArray(0) = Array(1, 2, 3)
  Form1.myArray(1) = Array(4, 5, 6)
  Form1.myArray(2) = Array(7, 8, 9)
  End Sub
  </code></pre>
  
  <p>The issues is that once the code runs, 'myArray' remains empty. 
  If I put the PopulateArrays Sub within the main Form1.frm the arrays do populate.
  Any thoughts?</p>