Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
500MB 27GB Web Hosting - $9.95/Month
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
TitleRound a number to a multiple of some number
Keywordsround off, digits, multiple
CategoriesAlgorithms
 
Divide by the second number, round to the nearest integer, and then multiply by the second number again.
 
' Round a value to the nearest multiple of a number.
Private Function RoundToMultiple(ByVal value As Double, _
    ByVal multiple As Integer) As Double
    RoundToMultiple = CInt(value / multiple) * multiple
End Function
 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated