Closed Thread
Results 1 to 4 of 4

Excel rollup macro works on file share but not in SharePoint document library

  1. #1
    Registered User
    Join Date
    02-18-2013
    Location
    Boston, MA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Excel rollup macro works on file share but not in SharePoint document library

    I have a macro which combines similarly formatted data from multiple workbooks into a rollup workbook when all files live in the same folder. It works fine on a file share but doesn’t work when the files are in a folder on a SharePoint site. I tried changing the sPath to the url of the SharePoint folder but the macro threw an error.

    The code below works when the files are in a file share.

    Please Login or Register  to view this content.

    Please Login or Register  to view this content.
    Thank you for any assisstance.
    Last edited by alansidman; 10-20-2013 at 10:39 AM. Reason: code tags added

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,893

    Re: Excel rollup macro works on file share but not in SharePoint document library

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (I have added them for you. Please read our rules and adhere to them in the future.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    02-18-2013
    Location
    Boston, MA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Excel rollup macro works on file share but not in SharePoint document library

    After some research I was able to map the sharepoint library to a drive name and use that in the sPath function which advanced the error to a later section as shown in attached file.

    revisedcodewithnrewerror.jpg

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Excel rollup macro works on file share but not in SharePoint document library

    Thread posted in CS subforum hence closed.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

Closed 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: 10-08-2013, 10:54 AM
  2. Macro to save to sharepoint library
    By chris.tinta in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-07-2012, 10:08 PM
  3. Expose cell values to SharePoint document library
    By phaley in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-15-2008, 12:23 PM
  4. Ho do I upload an Excel WorkBook to a SharePoint Document Library using VBA
    By mirror1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-28-2008, 11:24 PM
  5. Replies: 0
    Last Post: 05-07-2006, 10:45 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