title: What causes an entire ListBox column to be blank?
body: <p>I'm working on an Excel project where I have a VBA UserForm with two ListBox controls.  I load them by assigning an array to the List property.  All of the expected data shows up, except for the seventh column which is entirely blank.</p>
  
  <p><strong>Why is this entire column blank?</strong></p>
  
  <p>Additional details:<br>
  The array has around 15 columns and 25 rows.<br>
  The seventh column of the array is listed in Locals as type Variant/Decimal.  It contains <a href="https://en.wikipedia.org/wiki/Universal_Product_Code" rel="nofollow noreferrer">UPC</a> values (up to 14 digits) stored in the database as DECIMAL(14,0).<br>
  None of the UPC values are NULL or blank. They DO show up in the array in the Locals window and they can be retrieved from the ListBox, just not seen.<br>
  The ListBox has ListStyle fmListStylePlain and MultiSelect fmMultiSelectMulti.<br>
  Although you cannot Dim (declare) a variable as Decimal, you can convert to Decimal with the CDec function: <code>?typename(CDec(4.5))</code> in the Immediate window.</p>
  
  <hr>
  
  <p>Minimal Example:<br>
  Create a UserForm with a ListBox (Listbox1), two TextBox controls (TextBox1 and TextBox2), and two Command Buttons (CommandButton1 and CommandButton2).<br>
  In the Code Module of the UserForm, paste in the below code:</p>
  
  <pre><code>Private Sub CommandButton1_Click()
      Dim x(0 To 0, 0 To 0)
  
      x(0, 0) = CDec(TextBox1.Text)
      ListBox1.List = x
  
      TextBox2.Text = ListBox1.List(0, 0)
  End Sub
  
  Private Sub CommandButton2_Click()
      Dim x(0 To 0, 0 To 0)
  
      x(0, 0) = CDbl(TextBox1.Text)
      ListBox1.List = x
  
      TextBox2.Text = ListBox1.List(0, 0)
  End Sub
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/JIyHD.png" alt="Annotated Screenshot"></p>
  
  <p>Run the UserForm, type a number (with or without decimal places) in TextBox1, then click CommandButton1.  ListBox1 remains blank, but Textbox2 shows a value.<br>
  Click CommandButton2.  ListBox1 and TextBox2 show the value.</p>