Opening Excel Macro File from OneDrive not synced with Local PC - Path Issue

sintek

New Member
Joined
Oct 14, 2015
Messages
39
Hi All

Scenario is as follows...PC is not setup to sync | or linked to OneDrive Account
Log into OneDrive Account
Open File in Excel via Desktop App
File-Copy-icon.png

VBA Code:
Sub CheckPath()
Dim Path As String
Path = ThisWorkbook.Path & "/March 2021"
' ! This returns.... https://d.docs.live.net/9c2e2efd643d32d1/Sawis Solution/March 2021
With CreateObject("Scripting.FileSystemObject")
    If .FolderExists(Path) = False Then
        MsgBox "THERE IS NO FOLDER TO PROCESS", vbInformation, ""
        'Exit Sub
    End If
End With
Workbooks.Open (Path & "/Orders/Test1.xls") ' This works...
End Sub
Checking if Path exists returns False...
The Path does exist as I am able to open the file called Test1.xls...

What am I missing...This is driving me crazy...Does FileSystemObject even support URL Paths?

Same posted here ...
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
I can't say that for sure - there must be an API for working with OneDrive in the cloud.

I should have a new Windows laptop arriving soon, so when it does - if I have a chance - I'll do some experimenting.
 
Upvote 0

Forum statistics

Threads
1,214,632
Messages
6,120,649
Members
448,975
Latest member
sweeberry

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