hey guys,
im sure this is a really easy thing to do but, im currently trying to make a form that basically you enter numbers into three text boxes and it pumps and the sum in a label. I've got this working fine except for decimal places. using code" label.text = int(val(txtbox.text) +val(txtbox2.text)) "
i haven't done any coding in vb since 1996 so im a little hazy i think it has something to do with the int but not sure.

any help would be great

You are right integer variables don't have decimal places, they are for whole numbers only. Use float double or decimal variables.

thanks guys csng worked a charm.... is there a way to make it display 2 decimal places as in a currency 100.10?? it works ok if you have used 2 decimal places providing last one isn't a zero.

This question has already been answered. Start a new discussion instead.