|
-
Nov 18th, 2000, 12:54 PM
#1
Thread Starter
Junior Member
Hi everybody
I am trying to assign the result of a calculation to be returned as an integer but the result puts loads of decimal places that I dont want can anyone tell me where I,m going wrong
Thanks
-
Nov 18th, 2000, 01:06 PM
#2
Fanatic Member
the function to use is Round:
i.e.
Code:
Msgbox Round(2.888)
gives the result 3.
Be careful if you use Int. It takes the integer position only, thus Int(2.888) returns 2
Hope this helps
-
Nov 19th, 2000, 09:46 AM
#3
Thread Starter
Junior Member
re round
Hi
Thanks for the reply.i've put the number as single but it still rounds down. could the problem be that i'm obtaining the value with a calculation using integers??
Thanks!
-
Nov 19th, 2000, 12:05 PM
#4
Try, CInt.
Code:
MyValue = CInt(MyValue)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|