Muokkaa

Jaa


Cell.ResultInt property (Visio)

Gets the value of a cell expressed as an integer. Read-only.

Syntax

expression.ResultInt (UnitsNameOrCode, fRound)

expression A variable that represents a Cell object.

Parameters

Name Required/Optional Data type Description
UnitsNameOrCode Required Variant The units to use when retrieving the cell's value.
fRound Required Integer Zero (0) to truncate the value; non-zero to round it.

Return value

Long

Remarks

Getting the ResultInt property is similar to a getting a cell's Result property. The difference is that the ResultInt property returns an integer for the value of the cell, whereas the Result property returns 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.

lngRet = Cell.ResultInt (visInches, fRound)

lngRet = Cell.ResultInt (65, fRound)

lngRet = Cell.ResultInt ("in", fRound) 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.

The following constants for fRound are declared in the Visio type library in member VisRoundFlags.

Constant Value Description
visTruncate 0 Truncate the result.
visRound 1 Round the result.

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.