title: How to add 10 numbers to a ListBox with less code?
body: <p>I coded this. It's fine but can I write it with less code?</p>
  
  <pre><code>    If D = 10 Then
          ListBox3.Items.Add(1)
          ListBox3.Items.Add(2)
          ListBox3.Items.Add(3)
          ListBox3.Items.Add(4)
          ListBox3.Items.Add(5)
          ListBox3.Items.Add(6)
          ListBox3.Items.Add(7)
          ListBox3.Items.Add(8)
          ListBox3.Items.Add(9)
          ListBox3.Items.Add(10)
      End If
  </code></pre>
  
  <p>if you don't understand my question you can read the following example: </p>
  
  <p>We can code </p>
  
  <pre><code> Dim A As Integer
   Dim B As Integer
   Dim C As Integer
   Dim D As Integer
  </code></pre>
  
  <p>but we can code it in a more concise way like this</p>
  
  <pre><code>Dim A, B, C, D As Integer
  </code></pre>