VB and VBA Users Source Code: Re: Get File Version Information Details (OCX, EXE, DLL etc)
[
Home
|
Contents
|
Search
|
Reply
|
Previous
| Next ]
VB/VBA Source Code
Re: Get File Version Information Details (OCX, EXE, DLL etc)
By:
Andrew Baker
Email (spam proof):
Email the originator of this post
Date:
Monday, July 16, 2001
Hits:
1010
Category:
Windows API
Article:
Still not sure about this VBA dll thing. But in VB I would do one of the following: Add this code to the public class: Property Get VersionNumber() As String VersionNumber = App.Major & "." & App.Minor & "." & App.Revision End Property Or Property Get InstallPath() As String If Right$(App.Path, 1) = "\" Then InstallPath = App.Path & App.EXEName Else InstallPath = App.Path & "\" & App.EXEName End If End Property Or finally, read the version number from the registry (use the registry class from the downloads section): eg. For a class called "NetMessages.Message", you will need to get the class id from: HKEY_CLASSES_ROOT\NetMessages.Message\Clsid in this example the clsid was "{DB8F8E3D-BA5E-11D4-952A-00D0B7AC1F6A}" Then using this read the version number from: HKEY_CLASSES_ROOT\CLSID\{DB8F8E3D-BA5E-11D4-952A-00D0B7AC1F6A}\VERSION
Terms and Conditions
Support this site
Download a trial version of the Excel Workbook Rebuilder