title: VBA - translating code for ActiveX ListBox to forms ListBox
body: <p>I currently have code used for three ListBoxes in a worksheet  (Box1, Box2, Box3), which are all filled with the same values. One box is single select, and the other two are multi select. I am having rendering issues (with the boxes growing in size when other people open the file) and thought it might be worth switching over to forms ListBoxes. I have not yet been able to get the code to translate. </p>
  
  <p>Currently I have this function to populate the boxes:</p>
  
  <pre><code>Sub FillBox(MyBox As MSForms.ListBox, MultiType As Integer, DataArray As Variant)
      With MyBox
          .Clear
          .MultiSelect = MultiType
          For j = 1 To UBound(DataArray)
              .AddItem DataArray(j)
          Next j
      End With
  End Sub
  </code></pre>
  
  <p>To glean a value from the single-select box, <strong>Box1</strong>, I use:</p>
  
  <pre><code>Sheets(2).Cells(1,1) = Box1.Value
  </code></pre>
  
  <p>To obtain values from <strong>Box2</strong> and <strong>Box3</strong> this type of code is employed:</p>
  
  <pre><code>For k = 0 To Box2.ListCount - 1
      If Box2.Selected(k) = True Then
          Sheets(2).Cells(k+1,2) = Box2.List(k)
      End If
  Next k
  </code></pre>
  
  <p>I have been unable to get these same functions to work for a forms ListBox, including .Clear, .Selected(), .List(), etc. What is the alternative syntax for these types of operations? Or, if anything, is there a way to avoid bad rendering of ActiveX ListBoxes?</p>
  
  <p>This is the rendering problem that has kicked off this whole thing in the first place:
  <img src="https://i.stack.imgur.com/YEtLb.png" alt="enter image description here"></p>