Solved

Getting Project Version as a variable

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
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…

827 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