hasVB = False If ScriptEngineMajorVersion >= 2 then hasVB = True End If Function hasActiveXControl(name) on error resume next hasActiveXControl = False hasActiveXControl = IsObject(CreateObject(name)) End Function