error when using showCelsius="true"

Feb 17, 2009 at 6:49 AM
I have a issue with showCelsius=true. It gives an error if value =n/a so put this in to check for N/A

Function displayTemp(ByVal degF As String, ByVal dispCel As Boolean) As String
        If degF = "N/A" Then
            displayTemp = "N/A"
            Exit Function
        End If

      
 If dispCel Then
            degF = Int(degF)
            displayTemp = System.Math.Round((degF - 32) / 1.8)
        Else
            displayTemp = degF
        End If
        displayTemp = displayTemp.ToString
        If Len(displayTemp) < 2 Then
            displayTemp = "0" & displayTemp
        End If
        Return displayTemp
    End Function

I hope this helps someone how has the same problem... or... is there another fix for this?

Thanks for this great app.