I am trying to add two amounts of currency together. I have a function that will subtract them but when I change the minus to a plus it doesn't work. Can anybody tell me what I'm doing wrong? The function that works is:
Pass in $333.33 and $111.11
Function CalculateMissing(ByVal Total As String, ByVal Found As String) As String
Dim Missing As String
Missing = FormatCurrency(Total - Found)
Return Missing
End Function
Change the "Missing = " line to
Missing = FormatCurrency(Total + Found)
and you get the error
Input string was not in a correct format.
I don't understand.
Pass in $333.33 and $111.11
Function CalculateMissing(ByVal Total As String, ByVal Found As String) As String
Dim Missing As String
Missing = FormatCurrency(Total - Found)
Return Missing
End Function
Change the "Missing = " line to
Missing = FormatCurrency(Total + Found)
and you get the error
Input string was not in a correct format.
I don't understand.