title: Open an Excel file from SharePoint site
body: <p>I'm trying to open an Excel file from SharePoint using VBA. Because the file I'm looking for might be different each time I run the macro, I want to be able to view the SharePoint folder and select the file I need.</p>
  
  <p>The code below works fine when I want to look for a file on a network drive, however when I replace that with a SharePoint address I get "run-time error 76: Path not found".</p>
  
  <pre><code>Sub Update_monthly_summary()
  
  Dim SummaryWB As Workbook
  Dim SummaryFileName As Variant
  
  ChDir  "http://sharepoint/my/file/path"
  SummaryFileName = Application.GetOpenFilename("Excel-files,*.xls", _
  1, "Select monthly summary file", , False)
  If SummaryFileName = False Then Exit Sub
  
  Set SummaryWB = Workbooks.Open(SummaryFileName)
  
  End Sub
  </code></pre>
  
  <p>When I paste this address into Windows Explorer I have no problems accessing the SharePoint folder, so I know the path is correct.  </p>
  
  <p>Why doesn't VBA like it?</p>