'############################################################ Public Function PercentageIncrease(ByVal intStartValue As Integer, ByVal intEndValue As Integer) As Long On Error GoTo Err_Fail PercentageIncrease = 1 PercentageIncrease = ((intEndValue - intStartValue) / intStartValue) * 100 Exit Function Err_Fail: MsgBox(ErrorToString) End Function '############################################################
Percentage Increase
Rounding
'############################################################ Round To Nearest X Decimal Places intStrength = Math.Round(intTmp2, X) Round Up To Nearest Hundred intHighestValue = Math.Ceiling(intHighestValue / 100) * 100 Round Down To Nearest Hundred intHighestValue = Math.Floor(intHighestValue / 100) * 10 '############################################################
'############################################################ Private _rnd As New Random() Function RandomNumber(ByVal low As Integer, ByVal high As Integer) As Integer Return _rnd.Next(low, high) End Function 'Simple But Reiterates... Public Function CreateRandomNumber(intMax As Integer, intMin As Integer) As Integer CreateRandomNumber = CInt(Math.Ceiling(Rnd() * intMax)) + intMin End Function '############################################################
Random Numbers
www.CarlsPlace.co.uk
Home
VB.Net
Functions
Database
Charts
Graphics
Strings
Maths
Useful Stuff
My Training
My Documents
Web-Links
Joinery Projects