![]() |
Version # in excel
Want to put a version number in an excel spreadsheet - that cannot be
altered. I like the idea of the Custom Properties - but that appears like an end user could change it. I want to include a version number for debugging (so I know which version they are using). Any insight/ideas would be greatly appreciated. BBB |
Version # in excel
Use a hidden name
With ActiveWorkbook .Names.Add Name:="Version", RefersTo:="1.02.100" .Names("Version").Visible = False End With -- HTH Bob Phillips "Billy Boone" wrote in message news:Ziese.56327$x96.28775@attbi_s72... Want to put a version number in an excel spreadsheet - that cannot be altered. I like the idea of the Custom Properties - but that appears like an end user could change it. I want to include a version number for debugging (so I know which version they are using). Any insight/ideas would be greatly appreciated. BBB |
Version # in excel
So how to I got about executing that code?
Then where would I go to view the version number (in the code again). Forgive my ignorance. "Bob Phillips" wrote in message ... Use a hidden name With ActiveWorkbook .Names.Add Name:="Version", RefersTo:="1.02.100" .Names("Version").Visible = False End With -- HTH Bob Phillips "Billy Boone" wrote in message news:Ziese.56327$x96.28775@attbi_s72... Want to put a version number in an excel spreadsheet - that cannot be altered. I like the idea of the Custom Properties - but that appears like an end user could change it. I want to include a version number for debugging (so I know which version they are using). Any insight/ideas would be greatly appreciated. BBB |
Version # in excel
Billy,
In the VBA Editor, add a new module, and use the following code: Sub AddVersionNumber() With ActiveWorkbook .Names.Add Name:="Version", RefersTo:="1.02.100" .Names("Version").Visible = False End With End Sub Sub ViewVersionNumber() MsgBox "Version: " & Mid(ThisWorkbook.Names("Version").Value, 2) End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Billy Boone" wrote in message news:bugse.57603$_o.14989@attbi_s71... So how to I got about executing that code? Then where would I go to view the version number (in the code again). Forgive my ignorance. "Bob Phillips" wrote in message ... Use a hidden name With ActiveWorkbook .Names.Add Name:="Version", RefersTo:="1.02.100" .Names("Version").Visible = False End With -- HTH Bob Phillips "Billy Boone" wrote in message news:Ziese.56327$x96.28775@attbi_s72... Want to put a version number in an excel spreadsheet - that cannot be altered. I like the idea of the Custom Properties - but that appears like an end user could change it. I want to include a version number for debugging (so I know which version they are using). Any insight/ideas would be greatly appreciated. BBB |
Version # in excel
You can also use that name in a worksheet
=Version -- HTH Bob Phillips "Chip Pearson" wrote in message ... Billy, In the VBA Editor, add a new module, and use the following code: Sub AddVersionNumber() With ActiveWorkbook .Names.Add Name:="Version", RefersTo:="1.02.100" .Names("Version").Visible = False End With End Sub Sub ViewVersionNumber() MsgBox "Version: " & Mid(ThisWorkbook.Names("Version").Value, 2) End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Billy Boone" wrote in message news:bugse.57603$_o.14989@attbi_s71... So how to I got about executing that code? Then where would I go to view the version number (in the code again). Forgive my ignorance. "Bob Phillips" wrote in message ... Use a hidden name With ActiveWorkbook .Names.Add Name:="Version", RefersTo:="1.02.100" .Names("Version").Visible = False End With -- HTH Bob Phillips "Billy Boone" wrote in message news:Ziese.56327$x96.28775@attbi_s72... Want to put a version number in an excel spreadsheet - that cannot be altered. I like the idea of the Custom Properties - but that appears like an end user could change it. I want to include a version number for debugging (so I know which version they are using). Any insight/ideas would be greatly appreciated. BBB |
All times are GMT +1. The time now is 07:26 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com