Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need help Rounding Up.

Status
Not open for further replies.

RotorTorque

Programmer
Apr 29, 2007
100
US
Hi all,
I have a VB.NET 2005. I need to know how to Round Up to the nearest whole number, for example:

125.11 should round up to 126
also
125.98 should round up to 126

How can I accomplish this?

Thanks in advance,
RotorTorque :)

 
RotorTorque

You can use the Math.Ceiling function to accomplish the rounding up.

ControlName.Text = Math.Ceiling(CDec(ControlName.Text))

Vic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top