+ Reply to Thread
Results 1 to 2 of 2

Tweak VBA to Move SharePoint Files to a Folder in Same Location

Hybrid View

  1. #1
    Registered User
    Join Date
    12-12-2012
    Location
    San Francisco, Californa
    MS-Off Ver
    Excel 2010
    Posts
    35

    Tweak VBA to Move SharePoint Files to a Folder in Same Location

    Hello all.

    I know this may be a long shot but I will take my chance and hope that I won't get reamed too bad.

    I have been given the job to read someone's vba who is a serious expert. I usually record and tweak the code for small to medium automation but I only want to use small parts of the existing VBA with the main function being to move an Excel file on SharePoint to the "Archive" folder in the same location.

    I have included partial code below (let me know if more is needed to understand).

    When I tweak the code, I get "Compile error: Sub or Function not defined."

    Can anyone helpless novice?


    Thank you in advance.

        If ListOfFilenamesWithPath.Count = 0 Then
            MsgBox "No file was found !"
        Else
            temp = MsgBox("Run Completed for " & ListOfFilenamesWithPath.Count & _
                " projects in about " & Round((Timer - Time1) / 60) & _
                " minutes. Active excel tab contains new L1 Rollup. Powerpoint window" & _
                " contains new L2 Rollup.  After sorting the L1 rollup and TOC tabs," & _
                " you can copy+paste them into the presentation.  The last tab (" & keepsht & ") may help with the TOC. " & _
                " Please delete it when you're done.", vbOKOnly, "DATA ROLLED UP!")
            updateSP = MsgBox("Updated month files (" & Replace(filesname, oldsufx, newsufx) & ") are ready to be added to " & filesfolder & _
                " and the " & filesname & " versions moved to Archive. " & _
                " Click Yes if you wish to update SharePoint now or No if you want" & _
                " to first look over the files in " & newfldr & " (then you'll need to rerun L1_and_L2_Rollup again).", vbYesNo, _
                title:="Ready to Update SharePoint.")
            If updateSP = vbYes Then Update_Sharepoint
        End If
    '        MsgBox ("Updated project files are currently stored in " & newfldr & ".  Use the Update Sharepoint macro if you are satisfied with them.")
    
    Finish:
    'reset to user's original calculation choice
        Application.Calculation = keepcalc
    End Sub

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Tweak VBA to Move SharePoint Files to a Folder in Same Location

    Is any part of the code highlighted when you get the error message?
    Martin

+ 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. open all excel files in a sharepoint folder
    By Ish23 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-13-2021, 02:36 AM
  2. Replies: 1
    Last Post: 01-28-2019, 06:55 PM
  3. [SOLVED] macro to move all files from one folder to another files
    By catchnanan in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-23-2013, 07:37 PM
  4. [SOLVED] Open all files in a SharePoint folder (Problem: Files open out of order)
    By holmstarrunner in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-10-2012, 10:13 AM
  5. Move Files from Folder to Folder
    By THE_RAMONES in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-25-2006, 04:25 PM

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