if ! IsClassRegistered("Excel.Application") messagebox("Excel cannot be found on this PC. You must have Excel installed " + ; "to run this procedure." + chr(10) + "For further assistance please contact your software vendor.",16,"Error message") return endif function IsClassRegistered lparameters tcClass #define HKEY_CLASSES_ROOT -2147483648 #define ERROR_SUCCESS 0 && OK declare integer RegOpenKey in Win32API ; integer nHKey, string @cSubKey, integer @nResult declare integer RegCloseKey in Win32API ; integer nHKey local lnKey lnKey = 0 llRetVal = ( RegOpenKey(HKEY_CLASSES_ROOT, tcClass, @lnKey) = ERROR_SUCCESS ) if llRetVal RegCloseKey(lnKey) endif return llRetVal endfunc