Getting Project Version as a variable

In VB6, is there anyway to get the project version information into variables?
alanconAsked:
Who is Participating?
 
Ask_EDConnect With a Mentor Commented:
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
 
macuCommented:
Something like:

With App

    sVar = .Major & "." & .Minor & "." & .Revision
   
End With
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.