title: Counting amount of files chosen
body: <p>I am using a function to select a few files:</p>
  
  <pre><code>Module OpenFileMod
  Public Function OpenFile() As String()
      'declare a string, this is will contain the filename that we return
      Dim strFileNames As String()
      'declare a new open file dialog
      Dim fileDialogBox As New OpenFileDialog()
  
      fileDialogBox.Filter = "Excel Files (*.xls)|*.xls"
      fileDialogBox.Multiselect = True
  
      'this line tells the file dialog box what folder it should start off in first
      'I selected the users my document folder
      fileDialogBox.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal)
  
      'Check to see if the user clicked the open button
      If (fileDialogBox.ShowDialog() = DialogResult.OK) Then
          strFileNames = fileDialogBox.FileNames
      Else
          MsgBox("You did not select a file!")
      End If
  
      'return the name of the file
      Return strFileNames
  End Function
  End Module
  </code></pre>
  
  <p>I would like to know how many files the user has chosen.</p>
  
  <p>How can I do that?</p>