Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default File Save Properties

Does anyone know how to access the properties for the last date/time
an .xls file was saved within VBA?

Thanks.

D
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default File Save Properties

Hi Daniel,

Dim dateLastSave As Date

dateLastSave = FileDateTime(ThisWorkbook.Name)

MsgBox dateLastSave


Note: ThisWorkbook.Name can be replaced with the name of the workbook in
double quotes and it can be any other workbook as well as the current one.
However, will need to include the path if it is not in the current default
path.

Example (In current default path):
dateLastSave = FileDateTime("My Other workbook.xls")

--
Regards,

OssieMac


"Daniel Jones" wrote:

Does anyone know how to access the properties for the last date/time
an .xls file was saved within VBA?

Thanks.

D
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default File Save Properties

On Nov 30, 4:37*am, OssieMac
wrote:
Hi Daniel,

Dim dateLastSave As Date

dateLastSave =FileDateTime(ThisWorkbook.Name)

MsgBox dateLastSave

Note: ThisWorkbook.Name can be replaced with the name of the workbook in
double quotes and it can be any other workbook as well as the current one..
However, will need to include the path if it is not in the current default
path.

Example (In current default path):
dateLastSave =FileDateTime("My Other workbook.xls")

--
Regards,

OssieMac

"Daniel Jones" wrote:
Does anyone know how to access the properties for the last date/time
an .xls file was saved within VBA?


Thanks.


D
.


Thanks for your help! Sorry, I'm a bit new to this. Which path is
the current default path?

I would like to use the code below to get the FileDateTime for the
active workbook. It doesn't seem like I need to change the default
directory, but how would you go about doing this if needed?

Sub TestFileSave()
Dim dateLastSave As Date
Dim strPath As String
strPath = ActiveWorkbook.Path & "\" & ActiveWorkbook.Name

dateLastSave = FileDateTime(strPath)
MsgBox dateLastSave
End Sub

Thanks!

D
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default File Save Properties

On Nov 30, 4:37*am, OssieMac
wrote:
Hi Daniel,

Dim dateLastSave As Date

dateLastSave = FileDateTime(ThisWorkbook.Name)

MsgBox dateLastSave

Note: ThisWorkbook.Name can be replaced with the name of the workbook in
double quotes and it can be any other workbook as well as the current one..
However, will need to include the path if it is not in the current default
path.

Example (In current default path):
dateLastSave = FileDateTime("My Other workbook.xls")

--
Regards,

OssieMac

"Daniel Jones" wrote:
Does anyone know how to access the properties for the last date/time
an .xlsfilewas saved within VBA?


Thanks.


D
.


Thanks for your help! Sorry, I'm a bit new to this. Which path is
the current default path?

I would like to use the code below to get the FileDateTime for the
active workbook. It doesn't seem like I need to change the default
directory, but how would you go about doing this if needed?

Sub TestFileSave()
Dim dateLastSave As Date
Dim strPath As String
strPath = ActiveWorkbook.Path & "\" & ActiveWorkbook.Name

dateLastSave = FileDateTime(strPath)
MsgBox dateLastSave
End Sub

Thanks!

D
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
Excel Properties Tab on Doc Save abet_72 Excel Discussion (Misc queries) 5 July 28th 08 08:21 PM
Save with preset Printer Properties alex3867 Excel Discussion (Misc queries) 0 August 18th 06 02:24 PM
Save As Dialog does not prompt for Web File Properties [email protected] Excel Programming 1 November 7th 05 08:57 AM
Properties transferring from excel cells to word file properties lubo Excel Programming 4 July 12th 05 11:24 AM
Changing the File Save Properties Kirk[_2_] Excel Programming 1 July 25th 03 07:20 PM


All times are GMT +1. The time now is 07:09 PM.

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"