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
Bookmarks