title: Open a extern workbook and returning a worksheet does not work
body: <p>My error has the number 1004:</p>
  
  <pre><code>Function getWorksheet(SheetNumber As Integer) As Worksheet
  
      Dim workbook As workbook
      Dim file As Variant
  
      file = ShowFileDialogAndFindFile
  
      Set workbook = Workbooks.Open(file, True, True)
  
      getWorksheet = workbook.Worksheets(SheetNumber)
  
  End Function
  
  Function ShowFileDialogAndFindFile() As Variant
  
      Dim fd As FileDialog
  
      Set fd = Application.FileDialog(msoFileDialogFilePicker)
  
      Dim vrtSelectedItem As Variant
  
      With fd
  
          If .Show = -1 Then
  
              For Each vrtSelectedItem In .SelectedItems
  
                  ShowFileDialog = vrtSelectedItem
  
              Next vrtSelectedItem
          Else
          End If
      End With
      Set fd = Nothing
  
  End Function
  </code></pre>
  
  <p>I am invoking from another module:</p>
  
  <pre><code>Dim sheetExtern As Worksheet
  sheetExtern = getWorksheet(1)
  </code></pre>