VAL function gives rounded integer [SOLVED]
hi
I got here a text box which hold an integer with decimals but when I try to retrieve it and convert it into integer value it will round it automatically, and I'm pissed off to fixed it even CDbl will give rounded...
here
text1.text = ".5"
b = text1.text
c = Val(b)
msgbox c '<<<will show Zero !!!!
any help is highly appreciated
S. Mohammad Najafi
Re: VAL function gives rounded integer [Urgent]
What datatype is c?
Quote:
Originally posted by vbcodec
hi
I got here a text box which hold an integer with decimals but when I try to retrieve it and convert it into integer value it will round it automatically, and I'm pissed off to fixed it even CDbl will give rounded...
here
text1.text = ".5"
b = text1.text
c = Val(b)
msgbox c '<<<will show Zero !!!!
any help is highly appreciated
S. Mohammad Najafi