title: Access VBA: How to count items of a ComboBox?
body: <p>In my <code>ComboBox</code> I have some items already selected.</p>
  
  <p>I would like to count them with VBA. I was expecting to find something like the following string, but I get <code>Compile error: Argument not optional</code>.</p>
  
  <pre><code>Me.&lt;ComboBox_name&gt;.ItemData.Count
  </code></pre>
  
  <p>I also thought to use the following string but it gives me <code>0</code> items:</p>
  
  <pre><code>Me.&lt;ComboBox_name&gt;.ItemSelected.Count
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/O4Ptd.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/O4Ptd.jpg" alt="enter image description here"></a></p>