ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Registry (https://www.excelbanter.com/excel-programming/271692-re-registry.html)

Tom Ogilvy

Registry
 
You might want to modify the check to

IF val(application.Version ) = 8 then

or
if clng(Left(application.Version,instr(application.Ve rsion,".")-1)) = 8 then

because in xl97, application.Version can return something like 8.0e

Regards,
Tom Ogilvy


"Mike" wrote in message
...
If you are trying to find the version of Excel, use the
function Application.Version.

If Application.Version = 8 Then
Sheets("Sheet1").Select
Else
Sheets("Sheet2").Select
End If

-----Original Message-----
Can someone advise on the code to check the registry
flag browser (value=8) in
MyComputer\HKey_Current_User\Software\Microsoft\O ffice\8.0
\Excel

i want the code to detect the value and then if it is 8
to select Sheet 1 and if it isn't 8 to select Sheet 2

thank you
.




Tom Ogilvy

Registry
 
Now I have a version of Excel 97 handy,
from the immediate window

? application.Version
8.0e


? val(application.Version)
8


Regards,
Tom Ogilvy


Tom Ogilvy wrote in message
...
You might want to modify the check to

IF val(application.Version ) = 8 then

or
if clng(Left(application.Version,instr(application.Ve rsion,".")-1)) = 8

then

because in xl97, application.Version can return something like 8.0e

Regards,
Tom Ogilvy


"Mike" wrote in message
...
If you are trying to find the version of Excel, use the
function Application.Version.

If Application.Version = 8 Then
Sheets("Sheet1").Select
Else
Sheets("Sheet2").Select
End If

-----Original Message-----
Can someone advise on the code to check the registry
flag browser (value=8) in
MyComputer\HKey_Current_User\Software\Microsoft\O ffice\8.0
\Excel

i want the code to detect the value and then if it is 8
to select Sheet 1 and if it isn't 8 to select Sheet 2

thank you
.







All times are GMT +1. The time now is 04:14 PM.

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