Thread: Registry
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default 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
.