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
|