Can you explain what ‘will not work’ means? Do you get an error?
If so, what type of error do you get?
What is the exact line of code that you use to format the number (maybe you are using a wrong format)?
I guess he is mixing presentation with processing. Need to be careful of correct decimal separator, and remove things like “$” from the string before conversion
If you expect format to output negative number you need a - on the start of your format. Otherwise the sign is ignored and a positive version is always output. If you add - before your string positives appear as they do, negatives are preceded with a - sign.
Don’t think that you know the format strings because you know Microsoft Excel, there are significant differences. Check the documentation.
From what I see you are possibly using the format function with the wrong formatting characters. Please see my example which outputs the USD Currency formatting for your double number.
HTH,
Mike
// BREAK OUT FOR EASE OF IDE TROUBLESHOOTING
Var label8ValueDbl as Double = newMortgageAmortizationProgramWindow.Label8.text.ToDouble
Var cellTextValDbl as Double = newMortgageAmortizationProgramWindow.ListBox1.CellTextAt(newMortgageAmortizationProgramWindow.ListBox1.RowCount-1,3).ToDouble
// PERFORM MATH
Var newInterestPaidAfterLumpSumPaymentDbl as Double = label8ValueDbl - cellTextValDbl
// FORMAT STRING
Var formattedLumpSumPayStr as String = Format(newInterestPaidAfterLumpSumPaymentDbl, "\$###,###.00")