+ Reply to Thread
Results 1 to 7 of 7

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

  1. #1
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,236

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

    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

    Please Login or Register  to view this content.
    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?
    I also tried various URL Validity Functions...All return true even if such a folder does not exist...

    Same posted here

    Does this mean that the only way for VBA to work via OneDrive Web is to actually have it linked | synced to local Drive...?

    Or...holding thumbs...has someone have a solution...
    Last edited by sintek; 03-10-2021 at 03:04 AM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

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

    I just get in VBA, I don't know much but I think FileSystemObject doesn't support URL path.

    Maybe change URL path to Local path before check

    Please Login or Register  to view this content.

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,236

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

    Hi Bo_Ry

    Thanks for response...I had a previous thread solved by this...
    Problem is...OneDrive is not linked | synced to any Local Drive...Cloud access only...

  4. #4
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

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

    Just some thought,
    I tried Evaluate but it always gives an error.
    Evaluate("='" & fPath & "Sheet1'!A1")

    I need to put the formula to the cell.
    [Z1].Formula = "='" & fPath & "Sheet1'!A1"


    Please Login or Register  to view this content.

  5. #5
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,236

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

    Thanks Bo_Ry

    The issue is not opening files that exist..the issue is checking for folders and also if not to MkDir...This just does not seem possible with OneDrive URL...

  6. #6
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

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

    I don't know how to check OneDrive URL folder exists.

    But if the file in that folder exists, that means the folder exists.

    Code in #4 checks if the file in that folder exists without open the file.
    Last edited by Bo_Ry; 03-10-2021 at 08:17 AM.

  7. #7
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,236

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

    No solution here...Time to convince client to sync OneDrive with local Drive...

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Find path to local synced sharepoint folder
    By rob vandebergh in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-16-2020, 01:06 PM
  2. VBA Code to copy Files From Onedrive Folder To Local Path
    By hrayani in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-08-2020, 01:29 PM
  3. How do you prevent an Excel file from automatically opening in OneDrive?
    By stardustandsunshine in forum Excel General
    Replies: 0
    Last Post: 09-12-2019, 06:10 PM
  4. [SOLVED] Opening an Excel worksheet from OneDrive on a Network (SharePoint)
    By Frankie_The_Flyer in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-13-2019, 03:12 AM
  5. Replies: 0
    Last Post: 03-24-2019, 09:18 AM
  6. [SOLVED] Get OneDrive online shared file and saved it to your local disk
    By jaryszek in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 12-10-2018, 09:14 AM
  7. Excel VBA get Network path from local path
    By katto01 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-26-2013, 11:31 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1