Get workbook version

  • Thread starter Thread starter Chriss
  • Start date Start date
C

Chriss

I have a workbook that needs to be updated fequently and i need to know the
version of the workbook in the code in order to copy and replace newer
versions. I tought of insering a 'Version' property in the 'personalisation'
panel that is in the property of the file itself. But i can't seem to be
able to get the value of this property in the code. The code would be in a
delphi program or in a macro in the workbook , i could use both methods. If
you have any idea or research keywords that could help me plz tell me !

thanx !
chriss
 
Hi
try the following:
1. Add the custom property 'Version' to your document properties
2. Paste the following UDF in one of your modules
Function Cus_DocProps(prop As String)
On Error GoTo err_value
Cus_DocProps = ActiveWorkbook.CustomDocumentProperties(prop)
Exit Function
err_value:
Cus_DocProps = CVErr(xlErrValue)
End Function

3. Call this function for example with
version = Cus_DocProps("Version")
 
Sorry for the multi posting :(
i just wanted to get the more answers as possible ;)

and thx for the fast answers !!!
realy nice :D
 
Thx again !! the code even works in delphi with minor changes!!

Realy nice and fast responses thx!

Chriss
 
Back
Top