Link to home
Start Free TrialLog in
Avatar of littlehogarth
littlehogarth

asked on

Find whether a method exists for an object

I have an application that allows for vbscript and jscript macros. The application has new methods added in newer versions that give better functionality, but I want to maintain backward compatibility. Is there a way to check if an object has a specific property or method?

If I try and use a property that doesn't exist I get error:
"Object doesn't support this property or method: 'object.method'"

ASKER CERTIFIED SOLUTION
Avatar of Justin Mathews
Justin Mathews

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of littlehogarth
littlehogarth

ASKER

Thanks for answering so quickly. That is too easy. I had thought about that, but wasn't sure if that was bad practice to use an error to check if something exists. Guess it is the vbscript way.