View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Michel Pierron[_2_] Michel Pierron[_2_] is offline
external usenet poster
 
Posts: 63
Default excel 2002 build version and servicepack information needed

Hi Sanjay,

Sub XL_Version()
Dim T(1 To 8, 1 To 2) As String, i As Integer, xlVersion As String
For i = 1 To 8
T(i, 1) = Choose(i, "2000", "2000 SR1", "2000 SP2" _
, "2000 SP3", "XP", "XP SP1", "XP SP2", "XP SP3")
T(i, 2) = Choose(i, "9.0.0.2719", "9.0.0.3822", "9.0.0.4402" _
, "9.0.0.6926", "10.0.2614.0", "10.0.3506.0", "10.0.4302.0", "10.0.6501.0")
Next i
xlVersion = Application.VERSION & "." & Application.Build
For i = LBound(T) To UBound(T)
If InStr(1, T(i, 2), xlVersion) Then GoTo 1
Next i
MsgBox "Excel version: Unknown !", 64
Exit Sub
1: MsgBox "Excel version: " & T(i, 1) & " (" & T(i, 2) & ")", 64
End Sub

Regards,
MP

"sanjay wankhede" a écrit dans le message de
...
Hi,
I am doing the VBA code for creating reports in xls.
I want to know the xls build version and servicepack
informatiom.Although I could get the build and version but
can't get the servicepack information.
for e.g. I want to restict the user using version below
Excel 2002 and servicepack i.e.SP-2.
how do I get this.
Does anybody know this?
Thanks,
-sanjay