Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ray Ray is offline
external usenet poster
 
Posts: 267
Default Macro to check for file update

hi -

I have a workbook 'template' (not an .xla) that will be used many
users spread across the US. The current name of this file is:
CashRec_v11.0_TEMPLATE.xls

Occasional updates of this file will be needed, resulting in an
incremental increase in the version # (ie v11.0 to v11.1 to
v11.2 ....).

I'd like to have a macro that runs On_Open that will check whether a
newer version of the Template exists, with a pop-up box to notify ONLY
if a new version exists?

Thanks!
Ray
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Macro to check for file update

Folder = "C:\temp"
Templat_Name = "CashRec_v*_TEMPLATE.xls"
OldVersion = 11#

FName = Dir(Folder & "\" & Templat_Name)
FileVersion = Mid(FName, InStr(FName, "_v") + 2)
FileVersion = Left(FileVersion, InStr(FileVersion, "_") - 1)
If Val(FileVersion) OldVersion Then
MsgBox ("Warning: New Version of " & Templat_Name & " exists")
End If


"Ray" wrote:

hi -

I have a workbook 'template' (not an .xla) that will be used many
users spread across the US. The current name of this file is:
CashRec_v11.0_TEMPLATE.xls

Occasional updates of this file will be needed, resulting in an
incremental increase in the version # (ie v11.0 to v11.1 to
v11.2 ....).

I'd like to have a macro that runs On_Open that will check whether a
newer version of the Template exists, with a pop-up box to notify ONLY
if a new version exists?

Thanks!
Ray

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
Macro to pull data from another file - update name of file Don Excel Discussion (Misc queries) 2 February 10th 09 03:31 PM
macro to check file open ezil Excel Programming 2 July 20th 07 02:10 PM
Can you check the last update property of a file? Eric[_14_] Excel Programming 2 November 21st 03 02:24 PM
Automate open file, update links, run macro, close and save file Geoff[_7_] Excel Programming 2 August 26th 03 10:13 PM


All times are GMT +1. The time now is 04:11 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"