Auto Update Properties

K

kraljb

Is there a way to automatically update the properties of a spreadshee
when saved? (preferably without using VBA). Such that currently ther
are a series of spreadsheets that I deal with that everytime I save
change on, I have to go into the properties and change the versio
information.

Such that if a changeis made the version will auto-increment everytim
it is saved.

(This is on the Custom portion of the properties).

Thanks,
Joh
 
D

Dave Peterson

With VBA:

Maybe you could keep track of the version in a worksheet cell (???).

Then update it in the Before_Save event

Option Explicit
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)

Dim myCDP As DocumentProperties

Set myCDP = Me.CustomDocumentProperties

On Error Resume Next
myCDP("myVersion").Delete
On Error GoTo 0

myCDP.Add _
Name:="MyVersion", _
Type:=msoPropertyTypeString, _
Value:=Me.Worksheets("sheet1").Range("a1").Value, _
LinkSource:=False, _
LinkToContent:=False

End Sub

Or even retrieve it and add one????
 
Top