Footer : Last saved date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Problem : I have xlt template. When a user opens by double clicking the
template it creates xls.

What i want is that if xls is not yet saved then footer should print todays
date and time. but if xls is saved and being accessed later then it should
print the last saved time.

What i did : on workbook_beforeprint i wrote the following :-

Application.Volatile
ActiveSheet.PageSetup.LeftFooter=_
ThisWorkbook.BuiltinDocumentProperties("Last Save Date")

It works fine if the xls has been saved once but if it is not yet saved then
it prints the last saved date of the template and not the xls created.
 
Hi
no chance around this restriction. You have to save first before this
document property is updated. what other date would you expect anyway
:-))
 
Hi Ajit

You can use this
If the file is not saved it have no path


If Len(ThisWorkbook.Path) = 0 then

.......

Else

.......

End if
 
I would expect today's date if not saved (and not the last template saved
date).
 
Hi
but as this is not a 'saved date' this would be 'wrong' :-)
You may use Ron's suggestion to check for a non-saved workbook and use
then the current date
 
Yes you are right, Ron's suggestion worked perfect.

Thanks you very much for chipping in your views.

Thumbs up!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top