Hi, I have a format exception error when I try and calculate the price of a product and service in a program using menu bars in vb. I'm not sure what's wrong except there's an error with index(zero-based) not being the correct size. Here's the small portion of the code (the error is in a portions like this.)
If rad2.Checked = True Then
If radF.Checked = True Then
total = 12.0
'add deposit and display
Deposit = 30.0
total = total + Deposit
total = FormatCurrency(total, 2)
lstOutput.Items.Add(String.Format(fmtTable, "Lawn mower ", FormatCurrency(12.0, 2), "(Full-day rental)"))
lstOutput.Items.Add(String.Format(fmtTable, "Deposit", FormatCurrency(Deposit, 2)))
lstOutput.Items.Add("----------------")
lstOutput.Items.Add(String.Format(fmtTable, "Total", FormatCurrency(total, 2)))
End If
Just please tell me what to do to correct it, I only know up to menubars and select case, it's for my comp. science class. Thanks.