'版本对比
'oldVersion 旧版  newVersion 新版
'新版是不是比旧版新
Function VersionComparison(ByVal oldVersion as String, ByVal newVersion as String) as Boolean '版本对比
   'oldVersion 旧版  newVersion 新版
   '新版是不是比旧版新
   Dim as Integer  C1, C2 ,c3 , C4 ,d1 , d2 , d3 , d4
   Dim as String  Ca() , Da()
   vbSplit(oldVersion, ".", CA())
   vbSplit(newVersion, ".", Da())
   If UBound(Ca) < 3 Or UBound(Da) < 3 Then
      ReDim Preserve Ca(3), Da(3)
   End If
   C1 = Val(Ca(0))
   C2 = Val(Ca(1))
   c3 = Val(Ca(2))
   C4 = Val(Ca(3))
   
   d1 = Val(Da(0))
   d2 = Val(Da(1))
   d3 = Val(Da(2))
   d4 = Val(Da(3))
   
   
   If d1 > C1 Then
      Function = True
   ElseIf d1 = C1 And d2 > C2 Then
      Function = True
   ElseIf d1 = C1 And d2 = C2 And d3 > c3 Then
      Function = True
   ElseIf d1 = C1 And d2 = C2 And d3 = c3 And d4 > C4 Then
      Function = True
   Else
      Function = False
   End If
   
End Function