Cell.ResultInt Property
Visio Automation Reference |
Gets the value of a cell expressed as an integer. Read-only.
Version Information
Version Added: Visio 4.0
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. |
See Also