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 ...
 

sintek

New Member
Joined
Oct 14, 2015
Messages
39
I can tell you that MkDir is not going to work for this. :)
Hi Rory...Fancy meeting you here...lol

Safe to say...Only way for this to work is if PC is linked to OneDrive...Right
Just needed to make sure...
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
36,710
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,129,816
Messages
5,638,503
Members
417,030
Latest member
baqer

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
Top