Adding to a number with preceding zero's
If I have a text box that is txtRow = "07" and I want to add the xTemp wich is 2 to it how can I do this ?
xTemp is dimmed as string, but even if I change it to an integer it doesn't work.
xTemp + txtRow.text = ??? it will come out all funny like 207 or something
How can I get it to come out as "09" ?
* NOTE * No number will ever be negitive, and no total will go into tripple digits
Re: Adding to a number with preceding zero's
VB Code:
txtRow.Text = Right("00" & Val(txtRow.Text) + Val(xTemp), 2)
:)