title: Run-time error'1004': Method 'Open' of object 'Workbooks' failed
body: <p>Using Microsoft Excel 2010; Visual Basic for Applications (VBA)</p>
  
  <p>Trying to write a procedure to open a workbook and copy the spreadsheet from one workbook into the active workbook. </p>
  
  <p>Run-time error'1004': Method 'Open' of object 'Workbooks' failed</p>
  
  <p>Below is the code I am using:</p>
  
  <pre><code>'Declares variables
  Dim ToBook As Workbook
  Dim FromBook As String
  Dim FromSheet As Worksheet
  Dim diaTitle As String
  Dim FilterName As String
  '-----------------------------------------------------------------------------------------------
  Set ToBook = ActiveWorkbook
  diaTitle = "Select Systems List"
  FromBook = Application.GetOpenFilename( _
      FileFilter:=FilterName, _
      FilterIndex:=2, _
      Title:=diaTitle)
  If FromBook = "False" Then
      Exit Sub
  End If
  Workbooks.Open _
      Filename:=FromBook, _
      UpdateLinks:=xlUpdateLinksNever, _
      ReadOnly:=False, _
      Format:=5, _
      Password:="", _
      WriteResPassword:="", _
      IgnoreReadOnlyRecommended:="", _
      Origin:="", _
      Delimiter:="", _
      Editable:="", _
      Notify:="", _
      Converter:="", _
      AddToMru:="", _
      Local:="", _
      CorruptLoad:=xlNormalLoad
  Set FromSheet = Workbooks(FromBook).Worksheets("Sheet1")
  '-----------------------------------------------------------------------------------------------
  FromSheet.Copy _
      After:=ToBook.Worksheets(6)
  Workbooks(FromBook).Close _
      SaveChanges:=False, _
      Filename:=FromBook, _
      RouteWorkbook:=""
  </code></pre>