![]() |
Get workbook version
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 |
Get workbook version
it would be a member of the customdocumentproperty collection .
See Chip Pearson's page on this: http://www.cpearson.com/excel/docprop.htm -- Regards, Tom Ogilvy "Chriss" <une add wrote in message ... 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 |
Get workbook version
Hi
o.k. you really have covered ALL newsgroups see your answer in Excel.worksheet.functions and please don't multipost. -- Regards Frank Kabel Frankfurt, Germany Chriss wrote: 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 |
Get workbook version
Chriss,
Try some code like the following Dim DocProps As DocumentProperties Dim V As Long Set DocProps = ThisWorkbook.CustomDocumentProperties On Error Resume Next V = DocProps("Version").Value If Err.Number < 0 Then ' doesn't exist, so add the property DocProps.Add Name:="Version", LinkToContent:=False, _ Type:=msoPropertyTypeFloat, Value:=0 End If On Error GoTo 0 V = V + 1 ' write the new value DocProps("Version").Value = V Debug.Print V -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Chriss" <une add wrote in message ... 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 |
All times are GMT +1. The time now is 04:41 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com