Solved

Getting Project Version as a variable

Posted on 2000-02-23
2
137 Views
Last Modified: 2010-05-02
In VB6, is there anyway to get the project version information into variables?
0
Comment
Question by:alancon
2 Comments
 
LVL 1

Expert Comment

by:macu
ID: 2555134
Something like:

With App

    sVar = .Major & "." & .Minor & "." & .Revision
   
End With
0
 
LVL 1

Accepted Solution

by:
Ask_ED earned 65 total points
ID: 2563529
Hi Alan,

Macu's response will work for the current project, but if you wanted the version number of an executable try:

Function GetVersion(PathSpec)
  Dim fso As Object
  Dim temp As String
  Set fso = CreateObject("Scripting.FileSystemObject")
  temp = fso.GetFileVersion(PathSpec)
  If Len(temp) Then
    GetVersion = temp
  Else
    GetVersion = "No version information available."
  End If

Set fso = Nothing
End Function

Hoep this helps
ED
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now