Jerome SOUBERVIE
asked on
How to open an excel file from a shared point server with vba code
Hello, I'd like to open an excel file located on a shared point server. While running vba code, I got an error message 1004 : 'Open' method of object 'Workbooks' failed. Don't see any issue in vba code or Loadfilepath variable value. Please help. Thanks.
Ok, try to share with us some of your tested code.
ASKER
Sub test()
Dim objWB As Workbook
Dim LoadFilePath As String
LoadFilePath = "http://internal.transportation.bombardier.com/sites/BOS/OPS%20Plan/SitePages/Home.aspx?RootFolder=%2Fsites%2FBOS%2FOPS%20Plan%2FShared%20Documents%2FCapacity%20Plan&FolderCTID=0x012000E8EDA307973255428579592D6D38F60C&View={8C426048-A7C0-45BE-99CD- AC76FED2BA CB}/Salesf orce_expor t_global.x lsx"
Set objWB = Application.Workbooks.Open (LoadFileP ath)
End Sub
Dim objWB As Workbook
Dim LoadFilePath As String
LoadFilePath = "http://internal.transportation.bombardier.com/sites/BOS/OPS%20Plan/SitePages/Home.aspx?RootFolder=%2Fsites%2FBOS%2FOPS%20Plan%2FShared%20Documents%2FCapacity%20Plan&FolderCTID=0x012000E8EDA307973255428579592D6D38F60C&View={8C426048-A7C0-45BE-99CD-
Set objWB = Application.Workbooks.Open
End Sub
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.