Hi All,
I have application which creates the excel reports using Ms Excel Template , the template called "abc.xls" and the output file which generates every day will be called "abc_01062011.xls" automatically.
The abc file has two sheets Data and Pivot
In pivot sheet I have the formula =Today() whic pulls today system date.
but the problem is that when the user open the report some other days' it shows system/Today's date instead of the day when the file was created.
I have used the following VBA code on the Pivot_Sheet
The first line i above VBA code for "Creation date" and the 2nd line is for when the file updated. When the application generates the output reports it shows the Date when the "Template" was created instead of the new file(abc_01062011) which created today.
I have also used the "Last Save Time" but it doesn't like that as well and pulls "bring the last update date of the Template again instead of actual generated report which is abc_01062011.xls
Is there any other way withouth VBA , coz Today() functions works OK on "Data" sheet where no Pivot exist.
I hope it does make sense to all
I appreciate your help
Regards
Farhan
I have application which creates the excel reports using Ms Excel Template , the template called "abc.xls" and the output file which generates every day will be called "abc_01062011.xls" automatically.
The abc file has two sheets Data and Pivot
In pivot sheet I have the formula =Today() whic pulls today system date.
but the problem is that when the user open the report some other days' it shows system/Today's date instead of the day when the file was created.
I have used the following VBA code on the Pivot_Sheet
Code:
Private Sub Workbook_Open()
Code:
Range("D1").Value = Format(ThisWorkbook.BuiltinDocumentProperties("Creation Date"), "short date")
'Range("D1").Value = Format(ThisWorkbook.BuiltinDocumentProperties("Last Save Time"), "short date")
End Sub
The first line i above VBA code for "Creation date" and the 2nd line is for when the file updated. When the application generates the output reports it shows the Date when the "Template" was created instead of the new file(abc_01062011) which created today.
I have also used the "Last Save Time" but it doesn't like that as well and pulls "bring the last update date of the Template again instead of actual generated report which is abc_01062011.xls
Is there any other way withouth VBA , coz Today() functions works OK on "Data" sheet where no Pivot exist.
I hope it does make sense to all
I appreciate your help
Regards
Farhan