ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   excel 2002 build version and servicepack information needed (https://www.excelbanter.com/excel-programming/309847-excel-2002-build-version-servicepack-information-needed.html)

sanjay wankhede

excel 2002 build version and servicepack information needed
 
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

Michel Pierron[_2_]

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




Mike Fogleman

excel 2002 build version and servicepack information needed
 
There seems to be too many leading zeros for the 9.0 series, eg 9.0.3822,
not 9.0.0.3822. Not sure about the 10.0 versions.

Mike F
"Michel Pierron" wrote in message
...
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






sanjay wankhede

excel 2002 build version and servicepack information needed
 
Thanx both of you for replying.
Is there any direct windows API to get this information or
some registry entry we can search on?
Thanx and regards
-sanjay
-----Original Message-----
There seems to be too many leading zeros for the 9.0

series, eg 9.0.3822,
not 9.0.0.3822. Not sure about the 10.0 versions.

Mike F
"Michel Pierron" wrote in message
...
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





.



All times are GMT +1. The time now is 06:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com