I know almost nothing about Visual Basic. So question may be stupid.
I have this code
In output need: if TaxableAmount is for example 5000, then need to display FederalRate 0.1. However I get 0.
What need to add to the code above to convert string to decimal (to get displayed 0.1 instead of 0)?
I have this code
Function FederalRate(TaxableAmount As String) As Long
If TaxableAmount > 0 And TaxableAmount < 2150 Then
FederalRate = 0
ElseIf TaxableAmount >= 2150 And TaxableAmount < 10850 Then
FederalRate = 0.1
ElseIf TaxableAmount >= 10851 And TaxableAmount < 37500 Then
FederalRate = 0.15
End If
End Function
In output need: if TaxableAmount is for example 5000, then need to display FederalRate 0.1. However I get 0.
What need to add to the code above to convert string to decimal (to get displayed 0.1 instead of 0)?