strHost = "."
Const HKLM = &H80000002
'connect to current machine registry
Set objReg = GetObject("winmgmts://" & strHost & "/root/default:StdRegProv")
Const strRoot = "HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\"
'check the registry for this particular path
'and return the values to an array - arrsubkeys
objReg.EnumKey HKLM, strRoot, arrSubKeys
'Enumerate the array and display the Name
For Each strSubk In arrSubKeys
intRet = objReg.GetStringValue(HKLM, strRoot & strSubK, _
"KEY_OraDb10g_home1", strValue)
If (strValue <> "") And (intRet = 0) Then
'strvalue wil be the value your ORACLE_home
Debug.Print strValue
End If
Next