[size=2][color=#0000ff]For[/color][/size][size=2] i = 0 [/size][size=2][color=#0000ff]To[/color][/size][size=2] (DSet.Tables(0).Rows.Count - 1)
Actual = dgDisplay.Item(i, 3)
[/size][size=2][color=#0000ff]If[/color][/size][size=2] [/size][size=2][color=#0000ff]CDbl[/color][/size][size=2](Actual) < [/size][size=2][color=#0000ff]CDbl[/color][/size][size=2](Min) [/size][size=2][color=#0000ff]Or[/color][/size][size=2] [/size][size=2][color=#0000ff]CDbl[/color][/size][size=2](Actual) > [/size][size=2][color=#0000ff]CDbl[/color][/size][size=2](Max) [/size][size=2][color=#0000ff]Or[/color][/size][size=2] IsNumeric([/size][size=2][color=#0000ff]CDbl[/color][/size][size=2](Actual)) = [/size][size=2][color=#0000ff]False[/color][/size][size=2] [/size][size=2][color=#0000ff]Then
[/color][/size][size=2]MessageBox.Show("Actual Value Must be Between Min and Max Values.", "Range", MessageBoxButtons.OK, MessageBoxIcon.Error)
[/size][size=2][color=#0000ff]Exit[/color][/size][size=2] [/size][size=2][color=#0000ff]Sub
[/color][/size][size=2][/size][size=2][color=#0000ff]End[/color][/size][size=2] [/size][size=2][color=#0000ff]If
[/color][/size][size=2][/size][size=2][color=#0000ff]Next
[/color][/size]