ClassSystem.Math SyntaxDim result As Double = Math.Ceiling(d)
DescriptionThe Ceiling function returns the smallest integer greater than or equal to the argument d. ExampleMsgBox(Math.Ceiling(12.1)) ' Displays 13 MsgBox(Math.Ceiling(12.5)) ' Displays 13 MsgBox(Math.Ceiling(-12.5)) ' Displays -12 MsgBox(Math.Ceiling(-12.8)) ' Displays -12 Usage at a GlanceThis is a shared member of the System.Math class, so it can be used without an instance. Version DifferencesThe Ceiling function did not exist in VB 6. See AlsoFloor Function |