Imports Infragistics.CalcEngine
Imports Infragistics.Win.UltraWinCalcManager
Private Sub UltraCalcManager1_FormulaCalculationError(ByVal sender As Object, ByVal e As Infragistics.CalcEngine.FormulaCalculationErrorEventArgs) Handles UltraCalcManager1.FormulaCalculationError
Select Case e.ErrorInfo.Code
Case UltraCalcErrorCode.Div
'e.ErrorDisplayIcon = errorIconDivideByZero
e.ErrorDisplayText = "Divide by Zero Error"
e.ErrorValue = "#Div"
Case UltraCalcErrorCode.NA
'e.ErrorDisplayIcon = errorIconNA
e.ErrorDisplayText = "A formula of NA was encountered"
e.ErrorValue = "#NA"
Case UltraCalcErrorCode.Num
'e.ErrorDisplayIcon = errorIconInvalidNumericValue
e.ErrorDisplayText = "Invalid numeric values encountered"
e.ErrorValue = "#Num"
Case UltraCalcErrorCode.Value
'e.ErrorDisplayIcon = errorIconInvalidArgument
e.ErrorDisplayText = "Invalid argument type encountered"
e.ErrorValue = "#Value"
End Select
End Sub