title: Data structure which needs to be filled in VBA
body: <p>I need to load some data from an 2D array to an type array structure. </p>
  
  <p>My type structure looks like the following:</p>
  
  <pre><code>Public Type LocationType
    LocationID As String
    Description As String
    ZoneID As String
    IsEmpty As Boolean
    LastPalletArrivedTime As Date
    PalletID As String
    Sequence As Long
  End Type
  </code></pre>
  
  <p>I declared the following:</p>
  
  <pre><code>Dim LocationArray() As LocationType
  </code></pre>
  
  <p>which needs to be filled with data from a 2D array.</p>
  
  <p>The code I use to fill LocationArray is as follows:</p>
  
  <pre><code>For x = 1 To UBound(TextFileLine())
      LocationArray(x).Description = SplitTextLines(x, 0)
      LocationArray(x).LocationID = SplitTextLines(x, 1)
      LocationArray(x).Sequence = SplitTextLines(x, 2)
      LocationArray(x).ZoneID = SplitTextLines(x, 3)
      LocationArray(x).PalletID = SplitTextLines(x, 4)
      LocationArray(x).LastPalletArrivedTime = SplitTextLines(x, 5)
      LocationArray(x).IsEmpty = SplitTextLines(x, 6)
  Next x
  </code></pre>
  
  <p>I was wondering if there is any method or code I could use to make the code which I use to fill "LocationArray" easier? </p>
  
  <p>*Note all my variables are declared and code is working. I am just asking for better or easier method to the one I am currently using. 
  Help will be much appreciated.</p>