title: VBA - to call values from a vector defined in different macro
body: <p>My problem is following - I have a vector defined in one macro and I try to call the values from the vector in another macro. Despite the fact that all the objects are public, the second macro does not cooperate with the vector. Thank you for any suggestions which way to go.</p>
  
  <p>My code is following:</p>
  
  <pre><code>Public qj As Integer
  Public pp_ii(5) As Variant
  
  Public Sub Loop_over_pp()
   Dim myarray As Variant
      pp_ii = Array(51, 52, 53, 54, 55)
      For qj = 0 To UBound(pp_ii)
         Call Macro1
      Next qj
  End Sub
  
  Public Sub Macro1()
    Worksheets("List1").Range("A" &amp; qj) = pp_ii(qj)
  End Sub
  </code></pre>