Skip to Main Content Skip to Search
Product Documentation

ismethod (COM) - Determine whether input is COM object method

Syntax

tf = h.ismethod('methodname')
tf = ismethod(h,'methodname')

Description

tf = h.ismethod('methodname') returns logical 1 (true) if the specified methodname is a method you can call on COM object h. Otherwise, returns logical 0 (false).

tf = ismethod(h,'methodname') is an alternate syntax.

COM functions are available on Microsoft Windows systems only.

Examples

Test members of an instance of a Microsoft Excel application:

h = actxserver ('Excel.Application');
ismethod(h,'SaveWorkspace')

MATLAB returns true, SaveWorkspace is a method.

 

Try the same test on UsableWidth:

ismethod(h,'UsableWidth')

MATLAB returns false, UsableWidth is not a method; it is a property.

See Also

class | isevent | isobject | isprop | methods | methodsview

How To

  


» Learn more
» Download free kit
» Get trial software

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS