LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 345
Default Getting at Windows File Created date with VBA


In my app I use this slightly modified, (from a recorded macro) code
to save a workbook and create the standard backup
"Backup of ????????????.xlk" file name.

Application.DisplayAlerts = False
ActiveWorkbook.SaveAs FileName:=FullNa, _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=True
Application.DisplayAlerts = True

In the open event, if the "Backup of " workbook is opened, I'd like to
show the DATE and TIME the backup was made. I don't know how to get at the
windows 'file modified' or created time stamp.

If someone could provide some code to get at this date, I'd appreciate
it. The FullNa var above contains the full path and the workbook name
of the original and my testing show the backup goes to the same folder.

In the app, I have a hidden worksheet, (DataStore) that holds
other indicative data about the workbook. If I can't "get at" the windows
date, is it a bad idea to store the Now time in my DataStore ?

I use a function I develped to search the DataStore and retrieve values
based on a home-grown 'data-key'


Thanks,
Neal Z.
--

 
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
Excel 2003 file/properties to view created date/time how in 2007? Bald Eagle Boy Excel Discussion (Misc queries) 2 June 27th 12 09:11 PM
How do I find date a data file in Outlook has been created? dcoville Excel Discussion (Misc queries) 0 July 1st 09 05:14 PM
can not print excel document on mac that was created in windows Dana Excel Discussion (Misc queries) 0 November 30th 06 11:50 PM
Change File DATE created & modified Don Guillett[_4_] Excel Programming 3 April 26th 05 09:38 PM
EXCEL.exe has created errors and will be closed by Windows. help_wanted[_5_] Excel Programming 2 April 6th 04 09:11 PM


All times are GMT +1. The time now is 06:34 AM.

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

About Us

"It's about Microsoft Excel"