Var strTotalSale As String // These are declared earlier in the code stream...
Var curSale As Currency
If( strTotalSale.Left( 1 ).ToText = "$" ) Then
Var i As Integer = strTotalSale.Length - 1
curSale = strTotalSale.Right( i ).ToDouble
Else
curSale = strTotalSale.ToDouble
End If
It’s happening on the first line of the If statement. And I have used this many times before and never had an issue. I am using this to create an HTML doc that will be converted to PDF for printing but… this is just preparatory code that sets up a simple calculation.