Originally posted by baprince
I chose to have my users enter values in text-boxs. How do I automatically reformat the text to be numbers so that I can manipulate the data.
For instance the user enters a number into the "number of widgets" textbox. I then want to take the number and multiple by unit price, but I get #N/A.
Thanks for your help
Try something like this:
CDbl(InputBox("Enter the value"))
This will convert the value entered in the inputbox to a double data type. NOTE - you should put in some error handling for this in case the user enters something that can't be converted to a number. Like "Barrie", for example.