Hi
I am having trouble getting the last modified date property of a file that is being opened from a location on Sharepoint; and the data is incorrect.
This is whatI am doing:
I must also mention that I get the same property of another file that is located on a network drive without problem but the one from Sharepoint is not correct.
Any help is appreciated.
I am having trouble getting the last modified date property of a file that is being opened from a location on Sharepoint; and the data is incorrect.
This is whatI am doing:
Code:
[COLOR=black][FONT=Verdana] Function ImportSharePoint()[/FONT][/COLOR]
[COLOR=black][FONT=Verdana]Dim FilePath As String
Dim downloadTime As String
Dim SharePoint_FS As Object
Dim TRowsSourceFile As Long[/FONT][/COLOR]
[COLOR=black][FONT=Verdana] Set SharePoint_FS = CreateObject("Scripting.FileSystemObject")
'FilePath = InfoSheet.Range("C13").Value
InfoSheet.Range("D21") = FileDateTime(InfoSheet.Range("C13").Value) ' the date here is buggos
Workbooks.Open Filename:=FilePath, UpdateLinks:=False
'InfoSheet.Range("D21") = SharePoint_FS.GetFile(FilePath).DateCreated
'InfoSheet.Range("D21") = InfoSheet.Range("C13").Value
Application.StatusBar = "Share point file downloaded. Copying data...."
Set SourceWorkBook = ActiveWorkbook 'the workbook that is just openned
'etc
Application.DisplayAlerts = False
SourceWorkBook.Close
Application.DisplayAlerts = True
Application.Calculation = xlAutomatic[/FONT][/COLOR]
[COLOR=black][FONT=Verdana]End Function[/FONT][/COLOR]
I must also mention that I get the same property of another file that is located on a network drive without problem but the one from Sharepoint is not correct.
Any help is appreciated.
Last edited: