Actually PC888, I am coding in VB6. I am sorry for posting in VB.Net, but at the time I was unable to post a new thread in VB5&6!
But I am still having a problem . . . [Grrrrr]
Here is my code:
Private Sub cmdCalculate_Click()
Dim sngT_Coffee As Single
Dim sngT_Ambient As Single
'Dim sngTime As Single
If optT_Coffee_C = True Then
sngT_Coffee = (txtT_Coffee.Text) / (1) 'Keeps the celsius temperature inputted into textbox "Temperature of Coffee" the same in the formula calculation.
If optT_Coffee_F = True Then
sngT_Coffee = (5 / 9) * (txtT_Coffee.Text - 32) 'Converts fahrenheit temperature inputted into textbox "Temperature of Coffee" to celsius in the formula calculation.
If optT_Ambient_C = True Then
sngT_Ambient = (txtT_Ambient.Text) / (1) 'Keeps the celsius temperature inputted into textbox "Ambient Temperature" the same in the formula calculation.
If optT_Ambient_F = True Then
sngT_Ambient = (5 / 9) * (txtT_Ambient.Text - 32) 'Converts fahrenheit temperature inputted into textbox "Ambient Temperature" to celsius in the formula calculation.
'If optTime_s = True Then
'sngTime = (txtTime.Text) * (60) 'Converts the time in seconds inputted into textbox "Time" to minutes in the formula calculation.
'
'If optTime_m = True Then
'sngTime = (txtTime.Text) / (1) 'Keeps the time in minutes inputted into textbox "Time" the same in the formula calculation.
'
'If optTime_h = True Then
'sngTime = (txtTime.Text) / (60) 'Converts the time in hours inputted into textbox "Time" to minutes in the formula calculation.
txtTime.Text = (Log((sngT_Coffee - sngT_Ambient) / (75)) / (-0.1)) / Exp(1) 'This may not convert the solution in seconds, minutes, and hours
End Sub
Private Sub cmdExit_Click()
' Unloads the form from system memory and terminates the application.
Unload frmMain
End
End Sub
txtTime.Text should = ~27.1 minutes
and I am using Exp(1) as an identity of log(e) in Visual Basic v6.0 language
'HERE IS THE ERROR I RECEIVED
'Compile Error: Block If without End If
'Private Sub cmdCalculate_Click() is highlighted in yellow
'End Sub is highlighted in dark blue
Please help me understand why I received this error. I beleive it has something to do with me introducing the log into my calculation. Everything else in my code and form are solid.