Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Getting Project Version as a variable

Posted on 2000-02-23
2
Medium Priority
?
143 Views
Last Modified: 2010-05-02
In VB6, is there anyway to get the project version information into variables?
0
Comment
Question by:alancon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 195 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

721 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