Calculations kept by users are stored as "ToCheck..." on sharepoint. Once checked the file is than renamed to "Checked...". I am trying to delete the now superfluous "ToCheck..." file. First this code: Dim spMap As Object, spPath As String
Set spMap = CreateObject("WScript.Network")
spMap.MapNetworkDrive "X:", spPath
DoEvents
Kill (Pad & Naam)
. .
and later other code from internet (after ticking in tools/references MS scripting)
Dim fs As New Scripting.FileSystemObject
With fs
If .FileExists(yourfilepath) Then
.DeleteFile yourfilepath
End If
End With
.
.