Muokkaa

Jaa


Cell.ResultFromInt property (Visio)

Sets the value of a cell to an integer value. Read/write.

Syntax

expression.ResultFromInt (UnitsNameOrCode)

expression A variable that represents a Cell object.

Parameters

Name Required/Optional Data type Description
UnitsNameOrCode Required Variant The units to use when setting the cell's value.

Return value

Long

Remarks

Setting the ResultFromInt property is similar to setting a cell's Result property. The difference is that the ResultFromInt property accepts an integer for the value of the cell, whereas the Result property accepts a floating point number.

You can specify UnitsNameOrCode as an integer or a string value. If the string is invalid, an error is generated. For example, the following statements all set UnitsNameOrCode to inches.

Cell.ResultFromInt (visInches) = newValue

Cell.ResultFromInt (65) = newValue

Cell.ResultFromInt ("in") = newValue where "in" can also be any of the alternate strings representing inches, such as "inch", "in.", or "intCounter".

For a complete list of valid unit strings along with their corresponding Automation constants (integer values), see About units of measure.

Automation constants for representing units are declared by the Visio type library in member VisUnitCodes.

If the cell's formula is protected with a GUARD function, use the ResultFromIntForce property.

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.