+ Reply to Thread
Results 1 to 7 of 7

Cannot Find Correct O365 SharePoint Path For Excel VBA

  1. #1
    Registered User
    Join Date
    02-28-2014
    Location
    VA
    MS-Off Ver
    Excel 2016
    Posts
    35

    Cannot Find Correct O365 SharePoint Path For Excel VBA

    I've been trying to create files from Excel to our company SharePoint site on Office 365, so far without success. Here is the code:

    Please Login or Register  to view this content.




    I get a runtime error at this line:

    If Dir(sDC01 & sYear, vbDirectory) = "" Then



    I've tried this as well:

    https://CompanyName.sharepoint.com/s...mpusEng/Shared Documents/Campus Compliance/Generator Run and Training Logs/



    The code has to be able to run for whomever opens the file in the company, so I cannot use a local directory to save.


    You can also find the post here.
    Last edited by tkrupka; 02-19-2021 at 05:53 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    09-30-2018
    Location
    Vlaams Brabant Belgium
    MS-Off Ver
    365
    Posts
    456

    Re: Cannot Find Correct O365 SharePoint Path For Excel VBA

    hi,

    You might be helped by this:
    https://stackoverflow.com/questions/...-folder-exists
    Please be as complete as possible in your asking so it may save use all the time to rework the solution because you didn't give all the requirements. If you have a layout in mind please work it out first so we can adapt our solution to it. Thanks.
    If you have been helped, maybe you could click the *

  3. #3
    Registered User
    Join Date
    02-28-2014
    Location
    VA
    MS-Off Ver
    Excel 2016
    Posts
    35

    Re: Cannot Find Correct O365 SharePoint Path For Excel VBA

    I tried them all. No joy.

    Appreciate the option.

  4. #4
    Valued Forum Contributor
    Join Date
    09-30-2018
    Location
    Vlaams Brabant Belgium
    MS-Off Ver
    365
    Posts
    456

    Re: Cannot Find Correct O365 SharePoint Path For Excel VBA

    if you go to your file explorer en go to the directory select the address bar is the name completely the same as in you macro?
    and do you have access to make a directory?

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Cannot Find Correct O365 SharePoint Path For Excel VBA

    Administrative Note:

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.

    (Note: this requirement is not optional. No help to be offered until the link is provided.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  6. #6
    Registered User
    Join Date
    02-28-2014
    Location
    VA
    MS-Off Ver
    Excel 2016
    Posts
    35

    Re: Cannot Find Correct O365 SharePoint Path For Excel VBA

    Last edited by AliGW; 02-19-2021 at 05:57 PM. Reason: Edited so the forum name can be seen in the URL.

  7. #7
    Registered User
    Join Date
    02-28-2014
    Location
    VA
    MS-Off Ver
    Excel 2016
    Posts
    35

    Re: Cannot Find Correct O365 SharePoint Path For Excel VBA

    Quote Originally Posted by Joske920 View Post
    if you go to your file explorer en go to the directory select the address bar is the name completely the same as in you macro?
    No, because that would be a link on my computer and it needs to work for anyone who logs on.

    Quote Originally Posted by Joske920 View Post
    and do you have access to make a directory?
    Yes

+ 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. Replies: 0
    Last Post: 02-03-2021, 04:17 PM
  2. 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
  3. How to get the "local path" of excel file in sharepoint
    By diego208 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-17-2020, 02:23 PM
  4. open ppt from sharepoint using the File path in VBA
    By chandrashekar.shayan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-23-2019, 02:17 AM
  5. View path on Workbook_Open fails on Sharepoint
    By Jacc in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-01-2017, 05:48 AM
  6. SharePoint Path Not Found when Running Looping Macro
    By wakerider05 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-28-2015, 05:26 PM
  7. Find and output correct path
    By 9437excel in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-07-2011, 02:20 PM

Tags for this Thread

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