I am trying to fix an error in the command macro that moves the file from current folder location to another folder when clicked. However, the current code is not working and giving compile error. Any help is much appreciated since I am trying to solve this from a long time.
Private Sub Approve_Click()
Sub MoveFiles()
Dim FSO As Object
Dim SourceFileName As String, DestinFileName As String
Set FSO = CreateObject("Scripting.Filesystemobject")
SourceFileName = "https://xxxxxxxxx1/"
DestinFileName = "https://xxxxxxxxx2/"
FSO.MoveFile Source:=SourceFileName, Destination:=DestinFileName
MsgBox (SourceFileName + " Moved to " + DestinFileName)
End Sub