how to round to the nearest larger integer in vbsc

# Thread: how to round to the nearest larger integer in vbsc

1. Senior Member
Join Date
Dec 1969
Posts
147

## how to round to the nearest larger integer in vbsc

I need to round to round the number such as : 444.6 or 444.2 to 445. How to do it.<BR>cint can&#039;t do it. the others are not in my need.<BR><BR>thanks in advance!

2. Senior Member
Join Date
Dec 1969
Posts
96,118

## Write a function

&#060;%<BR>Function RoundUp( ByVal num )<BR>&nbsp; &nbsp; If num = Int(num) Then RoundUp = num Else RoundUp = Int(num)+1<BR>End Function<BR>%&#062;<BR><BR>Depending on how you want negative numbers to work, you may want to use FIX instead of INT.<BR><BR>

3. Senior Member
Join Date
Dec 1969
Posts
569

## Hey Billy

any suggestions <BR><BR>http://www.aspmessageboard.com/forum/asp.asp?M=348033&P=1&F=20

4. Senior Member
Join Date
Dec 1969
Posts
96,118

## Seems easy enough to me...

...but I haven&#039;t read through all the replies to you.<BR><BR>I&#039;d just have the links actually link to a JavaScript routine, rather than be HREF&#039;s to the pages, so that a "cancel" from the confirmation just ignores the click completely.<BR><BR>But what do you mean "go to the page he was working on before he hit the new link"? How can you possibly *know* which frame he was in just before that? He might have clicked on another window altogether and then come back and clicked on the new link. You want focus to go back to that unrelated window? I don&#039;t see how.<BR><BR>

5. Senior Member
Join Date
Dec 1969
Posts
96,118