The error tells you what the problem is. You're trying to treat a string like a number. For example, what if the user entered "a" in the text box. How can you multiply 2*a? You can't. The same is with a blank field. Also, there is a difference between "1" and 1. One is a string, the other is a number. What you need to do is ensure all fields being used are filled in with only numbers (or has a default number). Then, cast the fields from string to a number. Ie:
Dim myNumber as integer
myNumber = cInt(textbox1.text)




Reply With Quote
