title: Excel VBA GetOpenFileName error on MultiSelect:=True
body: <p>I'm getting error type mismatch. Please help as I'm new to VBA macro and not sure what I'm doing. I just want the code to be able to select multiple files on search:</p>
  <pre><code>Sub Main()
  
  On Error GoTo Error:
  
      'Open File to search
      myFile = Application.GetOpenFilename(MultiSelect:=True)
  
      bFirstLineExtract = True
      bFirstLineLog = True
      CellRowCounter = 2
      bFound = False
  
      'Get First Cell Value
      CellValue = Cells(CellRowCounter, 1)
  
      Do Until (CellValue = &quot;&quot;) Or (CellValue = Null)
          Open myFile For Input As #1
              Do Until EOF(1)
                  Line Input #1, textline
                  If InStr(textline, CellValue) Then
                      sCreateExtract
                      bFound = True
                  End If
              Loop
          If bFound = False Then
              sCreateLog
          End If
          Close #1
  
          CellRowCounter = CellRowCounter + 1
          CellValue = Cells(CellRowCounter, 1)
      Loop
      Close #1
  
  Exit Sub
  
  Error:
      MsgBox (&quot;Error in Main subroutine - &quot; &amp; Err.Description)
  
  End Sub
  </code></pre>