Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Footer : Last saved date

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.
--
Ajit
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Footer : Last saved date

Hi
no chance around this restriction. You have to save first before this
document property is updated. what other date would you expect anyway
:-))

--
Regards
Frank Kabel
Frankfurt, Germany

"Ajit" schrieb im Newsbeitrag
...
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.
--
Ajit


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Footer : Last saved date

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


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Ajit" wrote in message ...
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.
--
Ajit



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Footer : Last saved date

I would expect today's date if not saved (and not the last template saved
date).

"Frank Kabel" wrote:

Hi
no chance around this restriction. You have to save first before this
document property is updated. what other date would you expect anyway
:-))

--
Regards
Frank Kabel
Frankfurt, Germany

"Ajit" schrieb im Newsbeitrag
...
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.
--
Ajit



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Footer : Last 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

--
Regards
Frank Kabel
Frankfurt, Germany

"Ajit" schrieb im Newsbeitrag
...
I would expect today's date if not saved (and not the last template

saved
date).

"Frank Kabel" wrote:

Hi
no chance around this restriction. You have to save first before

this
document property is updated. what other date would you expect

anyway
:-))

--
Regards
Frank Kabel
Frankfurt, Germany

"Ajit" schrieb im Newsbeitrag
...
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.
--
Ajit






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Footer : Last saved date

Thanks Ron,
It worked perfect. Good Logic.

Thanx,
Ajit

"Ron de Bruin" wrote:

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


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Ajit" wrote in message ...
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.
--
Ajit




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Footer : Last saved date

Yes you are right, Ron's suggestion worked perfect.

Thanks you very much for chipping in your views.

Thumbs up!


"Frank Kabel" wrote:

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

--
Regards
Frank Kabel
Frankfurt, Germany

"Ajit" schrieb im Newsbeitrag
...
I would expect today's date if not saved (and not the last template

saved
date).

"Frank Kabel" wrote:

Hi
no chance around this restriction. You have to save first before

this
document property is updated. what other date would you expect

anyway
:-))

--
Regards
Frank Kabel
Frankfurt, Germany

"Ajit" schrieb im Newsbeitrag
...
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.
--
Ajit




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I capture the last date a file was saved in the footer DNader Excel Discussion (Misc queries) 3 November 18th 08 02:27 PM
Last saved date in footer Krazed&Konfused Excel Discussion (Misc queries) 0 August 6th 08 03:19 PM
Last Saved Date in Footer (right aligned) CherylH Excel Discussion (Misc queries) 8 September 5th 07 01:46 PM
Excel "Last Saved" in Footer Tylast Excel Discussion (Misc queries) 1 September 9th 05 09:55 PM
How to insert date last saved into the sheet (not the footer) Crispin Morton Excel Worksheet Functions 0 November 26th 04 08:30 AM


All times are GMT +1. The time now is 03:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"