﻿ MaximumValue Property (CurrencyCellType)
Spread Windows Forms 12.0 Product Documentation
MaximumValue Property (CurrencyCellType)
Example

Gets or sets the maximum value allowed for user entry.
Syntax
```'Declaration

Public Property MaximumValue As Decimal```
```'Usage

Dim instance As CurrencyCellType
Dim value As Decimal

instance.MaximumValue = value

value = instance.MaximumValue```
`public decimal MaximumValue {get; set;}`

#### Property Value

Decimal numeric value for the maximum value
Exceptions
ExceptionDescription
Specified value is beyond accepted limits
Remarks

The MinimumValue and MaximumValue properties limit the value that the user enters when editing the cell. It does not affect the data model and does not the limit the cell getting a value by other means, for example by means of a formula.

The built-in operators and built-in functions for use in formulas return results as a Double (15 digits).

Use the MinimumValue and MaximumValue properties to place range restrictions on user entry. For example the following code limits user input to values between 0 and 100.

CurrencyCellType cct = new CurrencyCellType();
cct.MinimumValue = 0.0;
cct.MaximumValue = 100.0;

Use the MIN and MAX functions to place range restrictions on formula calculations. For example, the following code limits the summation calculation to values between 0 and 100.

Example
This example specifies a currency cell and sets the formatting using the various properties.
```FarPoint.Win.Spread.CellType.CurrencyCellType currcell = new FarPoint.Win.Spread.CellType.CurrencyCellType();
currcell.CurrencySymbol = "CN\$";
currcell.DecimalPlaces = 4;
currcell.DecimalSeparator = "#";
currcell.FixedPoint = true;
currcell.MaximumValue = 999999999999;
currcell.MinimumValue = 1;
currcell.NegativeRed = true;
currcell.Separator = ",";
currcell.ShowCurrencySymbol = true;
currcell.ShowSeparator = true;
```Dim currcell As New FarPoint.Win.Spread.CellType.CurrencyCellType()
currcell.CurrencySymbol = "CN\$"
currcell.DecimalPlaces = 4
currcell.DecimalSeparator = "#"
currcell.FixedPoint = True