Thanks Tom.........I see what you are saying to be fact. I have both XP and
'97 on this machine as this company is 90% '97, so most of my stuff must run
on those machines. I'll check out Chips site for forcing the condition,
thanks for that.
BTW, I see that you're in Northern Virginia....a long time ago I used to
work for Atlantic Research Corp at Shirley Highway and Edsall Road in
Alexandria/Springfield. Now located in St. Petersburg, Florida, dodging
Hurricanes instead of shoveling driveways.
Vaya con Dios,
Chuck, CABGx3
"Tom Ogilvy" wrote:
xl97 (and earlier I would assume), did not update this property. To the best
of my knowledge, later versions do update it. Interestingly you could use a
file in xl2000 or later, then use it in xl97 and the time would not be
updated in xl97, but would remain with the time last used in xl2000 or later,
so in a mixed environment you could have the error or you could get the wrong
time.
If you want to force it, in the workbook beforesave event, you could update
it with code.
Chip Pearson may talk about this on his page (at least he used to).
http://www.cpearson.com/excel/docprop.htm
--
Regards,
Tom Ogilvy
"CLR" wrote:
As always Tom, your stuff "works fine, last's a long time".........thank you
most kindly.
BTW, why is it that some files have the "Last Save Time" and others don't,
thereby causing the error...........can the condition be forced somehow?
Vaya con Dios,
Chuck, CABGx3
"Tom Ogilvy" wrote:
Sub GetProps()
On Error Resume Next
MsgBox ActiveWorkbook.BuiltinDocumentProperties.Item("Aut hor")
if err.Number < 0 then
msgbox "Author Not Available"
err.clear
end if
MsgBox ActiveWorkbook.BuiltinDocumentProperties.Item("Las t Save Time")
if err.Number < 0 then
msgbox "Last Save Time not Available"
err.clear
end if
On Error goto 0
End Sub
--
Regards,
Tom Ogilvy
"CLR" wrote:
Hi All........
I am trying to use this code but on some files I get a VB error on the "Last
Save Time" line........how may I cause a return of "Not available" instead of
the VB error?
Sub GetProps()
MsgBox ActiveWorkbook.BuiltinDocumentProperties.Item("Aut hor")
MsgBox ActiveWorkbook.BuiltinDocumentProperties.Item("Las t Save Time")
End Sub