troubleshooting Question

How can I autosave to a sharepoint file using a excel macro when saving workbook to normal location.

Avatar of david Jogers
david Jogers asked on
Microsoft SharePointVBAMicrosoft ExcelMicrosoft Office
10 Comments2 Solutions225 ViewsLast Modified:

I run excel 2016 on a server and im trying to autorun a macro when the save button is clicked on the workbook I have open or if easier run it when workbook closed.

I need it to save the workbook thats open as normal to location it is at and also run the following macro in the background so people dont have to save twice.

 ActiveWorkbook.SaveAs Filename:= _
        "xxxs://" _
        , FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
End Sub

What im also trying to do is when it saves it to the sharepoint there will already be a file with the same name in it and so I need it overwritten with new file it saving,.

I have had a look at doing it via  autosave into one drive but this dont work.

Any Ideas?
Join our community to see this answer!
Unlock 2 Answers and 10 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros