I have spent some time trying to assign the calculated value of a variable to a results txt box with no success. The debug shows that the variable does hold the data but the txtbox will not accept it, though it throws up no errors. the following code is the problem...any ideas out there?
Dim result As Integer
result = (95 / Val(txtElement1.Text)) + (95 / Val(txtElement2.Text)) + (95 / Val(txtElement3.Text))
'If OpPpm is ticked then run this code
If OpPpm.Value = True Then
If CmbEfficiency.Text = "stechiometric" Then
If CmbEfficiency.Text = "phd-50/hd-2000" Then
If CmbEfficiency.Text = "fif-50" Then
If CmbEfficiency.Text = "bags" Then
TxtResults.Text = result / 0.2
End If
TxtResults.Text = result / 0.4
End If
TxtResults.Text = result / 0.6
End If
TxtResults.Text = result
End If
End If
this is just one of a list that i am running that all have the same problem. It's the txtresults.text in the 'TxtResults.Text = result' statment that is causing the problem.
cheers
simmo
Dim result As Integer
result = (95 / Val(txtElement1.Text)) + (95 / Val(txtElement2.Text)) + (95 / Val(txtElement3.Text))
'If OpPpm is ticked then run this code
If OpPpm.Value = True Then
If CmbEfficiency.Text = "stechiometric" Then
If CmbEfficiency.Text = "phd-50/hd-2000" Then
If CmbEfficiency.Text = "fif-50" Then
If CmbEfficiency.Text = "bags" Then
TxtResults.Text = result / 0.2
End If
TxtResults.Text = result / 0.4
End If
TxtResults.Text = result / 0.6
End If
TxtResults.Text = result
End If
End If
this is just one of a list that i am running that all have the same problem. It's the txtresults.text in the 'TxtResults.Text = result' statment that is causing the problem.
cheers
simmo