VBA workbooks.open opening file but is blank

grabrail

Board Regular
Joined
Sep 6, 2010
Messages
128
Office Version
  1. 365
Platform
  1. Windows
Hi

I am trying to create a macro, that opens an excel file from Sharepoint, then selects some specific data and copies it to my current workbook

First task, open excel file from Sharepoint.

I use the code

VBA Code:
workbooks.open "..url to file"

And run the macro, this runs and opens a workbook with the title I have entered in the URL but it appears to be a new file with 1 worksheet (file on sharepoint has multiple worksheets) that is completely blank

I have put the url i have into the browser bar and it opens the file with all data no problem

Any ideas?
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Sorted it, hopefully to help anyone else that has a similar issue

Don't use the Share Link as your URL, look at the details of the file on sharepoint, at the bottom of the details panel, there is a path section, copy the path from here.
 
Upvote 1
Solution

Forum statistics

Threads
1,214,924
Messages
6,122,293
Members
449,077
Latest member
Rkmenon

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top