Solved

Getting Project Version as a variable

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

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…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

777 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