Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Saving stripped down version of Excel Workbook | Excel Discussion (Misc queries) | |||
Find Version of Excel workbook is saved as | Excel Discussion (Misc queries) | |||
TROUBLE OPENING OLD WORKBOOK VERSION | Excel Discussion (Misc queries) | |||
Workbook created with old version of excel | Excel Discussion (Misc queries) | |||
How do I open each workbook in it's own version of Excel? | Excel Discussion (Misc queries) |