Results 1 to 3 of 3

Thread: [RESOLVED] Version Checking

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Location
    Chicago
    Posts
    136

    Resolved [RESOLVED] Version Checking

    I have a program that gets and checks the version numbers of several programs (Java, Acrobat, etc.) I'm having a problem though since several versions of the programs are numbered with two decimal points, for example 1.4.2 for Sun Java.

    My question is how can I check to see if 1.4.2 is greater or lesser than 1.5 or whatever the minimum requirement is?
    CodeBank: Launch IE

  2. #2
    Fanatic Member vbasicgirl's Avatar
    Join Date
    Jan 2004
    Location
    Manchester, UK
    Posts
    1,016

    Re: Version Checking

    i suppose if you can get the number into a string, you could do a string comparison something like this
    VB Code:
    1. Dim n1 As String
    2.  
    3. n1 = "1.4.2"
    4.  
    5. Select Case n1
    6.  Case Is > "1.5"
    7.   MsgBox "greater"
    8.  Case Is < "1.5"
    9.   MsgBox "smaller"
    10.  Case Else
    11.   MsgBox "same"
    12. End Select

    casey.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Mar 2005
    Location
    Chicago
    Posts
    136

    Re: Version Checking

    Thanks, I didn't think you could do a string comparison with numbers like that.
    CodeBank: Launch IE

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width