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!

converting string to a decimal number

Status
Not open for further replies.

aspro

Programmer
Jan 22, 2003
69
AU
hey
I am making a calculator program that will take the input from 2 textboxes and then times them together. it works fine if I use system.convert.toint32 but once i enter in a number like 45.25 it has trouble because of the decimal point. does anyone know of a better way to calculate the numbers and how best to validate them?

many thanks,
aspro
 
That is for integers, whole numbers

Try CDbl like this

val1 = CDbl(myTextbox.text)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top