Hi,
Why this code doesn't work? it returns an unexpected value actually total = 0.
total = Cscore(TextBox1.Text) * CDbl(TextBox2.Text)
when trying this
total = TextBox1.Text * TextBox2.Text
it returns the expected value but I need to pass textbox1.text to the function to get the desirable value
the function is this
Public Function Cscore(ByVal score As Integer) As Double
Select Case score
Case score = 100
Return 5.0
Case score >= 95
Return 5.0
Case score >= 90
Return 4.75
Case score >= 85
Return 4.5
Case score >= 80
Return 4.0
Case score >= 75
Return 3.5
Case score >= 70
Return 3.0
Case score >= 65
Return 2.5
Case score >= 60
Return 2.0
Case score < 60
Return 1.0
End Select
End Function
thanks in advance