Name: Anonymous 2007-12-04 15:11
I'm trying to create a program that takes input from the input box and then sends it to a textbox as a formatCurrency decimal. Whenever the loop ends, I get an error, "Input String was not in a correct format". Anybody know how to fix this?
Dim strTextBox As String
Dim decItemPrice As Decimal
Do
strTextBox = InputBox("Enter item price", "Item Price")
decItemPrice = Convert.ToDecimal(strTextBox)
txtItemPrice.Text = FormatCurrency(decItemPrice)
Loop Until strTextBox = ""
Dim strTextBox As String
Dim decItemPrice As Decimal
Do
strTextBox = InputBox("Enter item price", "Item Price")
decItemPrice = Convert.ToDecimal(strTextBox)
txtItemPrice.Text = FormatCurrency(decItemPrice)
Loop Until strTextBox = ""