title: Excel VBA - Populating multicolumn userform listbox from array. No data when array has only 1 item
body: <p>i have the following function that im using to populate a userform listbox with data from an array:</p>
  
  <pre><code>Function PopulateListboxWithArray(lstbox As MSForms.ListBox, var As Variant)
  
  With lstbox
  
      If Not IsEmpty(var) Then
      .Clear
          .list = Application.Transpose(var)
          .ListIndex = -1
      End If
  
  End With
  
  End Function
  </code></pre>
  
  <p>My listbox contains two columns with the following properties:</p>
  
  <p><a href="https://i.stack.imgur.com/nyofl.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nyofl.jpg" alt="enter image description here"></a></p>
  
  <p><strong>PROBLEM</strong></p>
  
  <p>The data in the array has an ID column and a lastname column. I dont want the user to see the ID column so ive set that column width to 0 in the form. </p>
  
  <p>When i import data that has more than one row, the data shows up in the listbox as expected.</p>
  
  <p><em>However, when the array only contains one row of data, the listbox shows up blank !</em></p>
  
  <p>I have tried deleting the columnwidths in the image above and when i do so and reimport the one row of data, i get the ID and lastname stacked on top of one another. But ofcourse this is not the result i want.</p>
  
  <p>I have even tried replacing <code>.list = Application.Transpose(var)</code> with <code>.list = var</code> to no avail.</p>
  
  <p>What am i doing wrong here, or is there a better way to populate a listbox? </p>
  
  <p>cheers</p>