Link to home
Start Free TrialLog in
Avatar of Mik Mak
Mik Mak

asked on

Getting lastmodified date of file on Sharepoint server

In Access 2016/2010 I use the VBA code below to get last modified date of a file - and it works fine, excep when it comes to mdb files on a Sharepoint server - all other file extensions are fine, but not when it comes to mdb files - anyone know a reason and a workaround for this ? Same scenario if I use the built-in  FileDateTime function.

Maybe a built-in feature of /%¤/%¤ Sharepoint, as I see a lot of similar questions, but no solutions:
example

Function GetDateModified(strPath As String) As String
    Dim fso As Scripting.FileSystemObject
    Dim file As Scripting.file

    Set fso = New Scripting.FileSystemObject
    Set file = fso.GetFile(strPath)
    GetDateModified = file.DateLastModified
    Set fso = Nothing
    Set file = Nothing
End Function

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Mik Mak
Mik Mak

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial