David Johnson
2019-05-20T15:50:52Z
If fill the cell value via code, with a number over 32,000, I don't get the error message when I enter a value over 32,000 during run time.
Code: igrid1.Cellvalue(lRow,lCol) = 1000000

if I fill the cell value via with a number below 32,000, I get error message "Invalid value: Overflow" when I enter a value over 32,000 during run time.

Code: igrid1.Cellvalue(lRow,lCol) = 0


I have created the grid column with the below code.
with igrid1
With .AddCol("Test", "Test", 80, igAlignHCenter, igAlignVCenter)
.eAlignH = igAlignHRight
.sFmtString = "Currency"
End With
end with


How do I fix this issue without having to pre-populate grid with a large value?

Thank you for your help.
Igor/10Tec
2019-05-21T10:47:14Z
iGrid automatically coerces any entered value to the type of the cell value. If you assign a numeric value to the cell value from code, actually you may save an Integer or Long value. If it was a literal below 32768, VB implies that it is an Integer value and any value greater than 32767 you try enter will be considered an overflow. To solve your problem, assign the corresponding Long value explicitly using a literal like 32000! or even CLng(32000).
David Johnson
2019-05-21T12:35:14Z
Thank you for your help, that fixed the problem.

David Johnson