title: Looping through Multi-selected Listbox values to create and name workbook
body: <p>The listbox is not assigning the selected values to "n". The "n" value is 0 regardless if I select values from the listbox or not.  I'm learning, so it could be something simple that I'm missing... suggestions?  Thanks!</p>
  
  <pre><code>Private Sub UserForm_Initialize()
  
  With cbomonth
      .AddItem "January"
      .AddItem "February"
  End With
  With cboyear
      .AddItem "2013"
      .AddItem "2014"
  End With
  With cboteam
      .AddItem "Team1"
      .AddItem "Team2"
  End With
  With cbodocument
      .AddItem "Task1"
      .AddItem "Task2"
  End With
  With ListBox1
  .AddItem "Name"
  .AddItem "Name"
  End With
  cboteam.ListIndex = 0
  cboyear.ListIndex = 4
  cbomonth.ListIndex = 6
  cbodocument.ListIndex = 1
  
  End Sub
  
  Private Sub cmdSubmit_Click()
  
      Dim year As String
      Dim month As String
      Dim days As Integer
      Dim team As String
      Dim n as Long
      Dim tallboxynames As Variant
      Dim tallynewfile As String
  
      Unload Me
  
      year = cboyear.Value
      month = cbomonth.Value
      team = cboteam.Value
      document = cbodocument.Value
  
      TallyPath = "\\network path\Tally of orders\Master Template\"
      TallyPath1 = "\\network path\Tally of orders\" &amp; year &amp; "\"
      TallyPath2 = "\\network path\Tally of orders\" &amp; year &amp; "\" &amp; month &amp; "\"
      TallyTemplate = "Tally_Template_ver1.xls"
  
  If document = "Tally Sheets" Then
      For n = 0 To ListBox1.ListCount - 1
          If ListBox1.Selected(n) Then
              tallynewfile = ListBox1.Selected(n) &amp; ".xls"
          Else
              MsgBox "No data from listbox"
          End If
  If Len(Dir(TallyPath1, vbDirectory)) = 0 Then
      MkDir TallyPath1
  End If
  If Len(Dir(TallyPath2, vbDirectory)) = 0 Then
      MkDir TallyPath2
      FileCopy TallyPath &amp; TallyTemplate, TallyPath2 &amp; tallynewfile
  End If
      Next n
  End If
  Exit Sub
  End Sub
  </code></pre>