hi all and thanks for any help in advance,
so i have been trying to insert the date of the file created into an excel spreadsheet based on when the file was created, the problem being is its picking up the original file creation date, so i originally created the file on the 19/06/2023 and i used the save as function to create a copy of that file on the 26/06/2023, the problem being is when you right click on the file and click properties it tells you the date and time the file was created. the correct date and time, but when i use VBA to create a macro it refers to the original file not the new file.
i have used the following and its giving me the incorect dates
Sub Workbook_Open()
Range("I1").Value = Format(ThisWorkbook.BuiltinDocumentProperties("Creation Date"), "short date")
Range("I2").Value = Format(ThisWorkbook.BuiltinDocumentProperties("Last Save Time"), "short date")
End Sub
i have also tried multiple weekday and date mixes to try and get the correct date with no correct equation
hoping someone can help as im at a loss
thanks
so i have been trying to insert the date of the file created into an excel spreadsheet based on when the file was created, the problem being is its picking up the original file creation date, so i originally created the file on the 19/06/2023 and i used the save as function to create a copy of that file on the 26/06/2023, the problem being is when you right click on the file and click properties it tells you the date and time the file was created. the correct date and time, but when i use VBA to create a macro it refers to the original file not the new file.
i have used the following and its giving me the incorect dates
Sub Workbook_Open()
Range("I1").Value = Format(ThisWorkbook.BuiltinDocumentProperties("Creation Date"), "short date")
Range("I2").Value = Format(ThisWorkbook.BuiltinDocumentProperties("Last Save Time"), "short date")
End Sub
i have also tried multiple weekday and date mixes to try and get the correct date with no correct equation
hoping someone can help as im at a loss
thanks