Skip to Main Content Skip to Search
Product Documentation

isprop (COM) - Determine whether input is COM object property

Syntax

tf = h.isprop('propertyname')
tf = isprop(h, 'propertyname')

Description

tf = h.isprop('propertyname') returns logical 1 (true) if the specified name is a property of COM object h. Otherwise, returns logical 0 (false).

tf = isprop(h, 'propertyname') is an alternate syntax.

COM functions are available on Microsoft Windows systems only.

Examples

Test a property of an instance of a Microsoft Excel application:

h = actxserver('Excel.Application');
isprop(h,'UsableWidth')

MATLAB returns true, UsableWidth is a property.

 

Try the same test on SaveWorkspace:

isprop(h,'SaveWorkspace')

MATLAB returns false. SaveWorkspace is not a property; it is a method.

See Also

inspect | isevent | ismethod

How To

  


» Learn more
» Download free kit
» Get trial software

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