By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,192 Members | 1,253 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,192 IT Pros & Developers. It's quick & easy.

Return Exact Decimal Point

P: 6
I wonder that after arithmetic calculation, the result will be rounded-off in VB 2005, eg. the exact result after computation is 0.67, but the VB will return the result automatically to 1.00. How can i get the exact result( 0.67) displays in TextBox field?
Sep 18 '07 #1
Share this Question
Share on Google+
3 Replies


hariharanmca
100+
P: 1,977
I wonder that after arithmetic calculation, the result will be rounded-off in VB 2005, eg. the exact result after computation is 0.67, but the VB will return the result automatically to 1.00. How can i get the exact result( 0.67) displays in TextBox field?
Just check the assigned variable is integer
Or post how you are computing and assigning through code
Sep 18 '07 #2

QVeen72
Expert 100+
P: 1,445
hI,

What data type have declared the Variable .
Declare it as double/single/currency.
if u have declared it as Integer/long, then u will get the Rounded figure..

REgards
Veena
Sep 18 '07 #3

P: 6
Thanks. I get it . I use Decimal as data type, actually.
Sep 20 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.