I have a workbook that has a command button to make a backup save. My employer wants it on our Teams and saved on SharePoint. I cannot figure out how to alter the code to work. Here is what the current code is that saves to the specified location:
Sub Backup_Save()
Dim wb As Workbook
Dim folderPath As String
Dim fileName As String
Set wb = ActiveWorkbook
folderPath = "C:ArtArt A"
With wb.Sheets("Vessel Schedule")
fileName = .Range("F2").Value & " - " & _
.Range("P1").Value & " - " & _
Format(Now(), "mm-dd hhmm ss") & ".xlsm"
MsgBox "Workbook saved successfully!"
End With
wb.SaveCopyAs fileName:=folderPath & fileName
End Sub
How would I alter the code to save in the same manner as above but to SharePoint?.
Tried using the SharePoint location, but would not work. Tried several suggestions from similar posts, but unable to get it to work.