Solved

Getting Project Version as a variable

Posted on 2000-02-23
2
136 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

757 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

20 Experts available now in Live!

Get 1:1 Help Now