white_flag
11-22-2010, 07:51 AM
Hello, I need your help.
I have the following: 2 textboxes to be summed and displayed in an Label text. I put the following code (but it is not working):
For i = 1 To 5
If Me.Controls("CheckBox" & i) = True Then
Formula = Formula + CDbl(CDbl(Me.Controls("TextBox" & i).Text) & "*(1+" & CDbl(Me.Controls("TextBox" & i + 1).Text) & "/100)")
Me.Controls("Label" & i + 38).Caption = Formula_A
End If
Next
then I cut the "CDbl"
For i = 1 To 5
If Me.Controls("CheckBox" & i) = True Then
Formula = Formula + CDbl(Me.Controls("TextBox" & i).Text) & "*(1+" & CDbl(Me.Controls("TextBox" & i + 1).Text) & "/100)"
Me.Controls("Label" & i + 38).Caption = Formula_A
End If
Next
the result is: I have the formula displayed in an label text but not solved (ex. 10*(1+10/100))-so it is like an text. Can be solved mathematically?
thx for input
I have the following: 2 textboxes to be summed and displayed in an Label text. I put the following code (but it is not working):
For i = 1 To 5
If Me.Controls("CheckBox" & i) = True Then
Formula = Formula + CDbl(CDbl(Me.Controls("TextBox" & i).Text) & "*(1+" & CDbl(Me.Controls("TextBox" & i + 1).Text) & "/100)")
Me.Controls("Label" & i + 38).Caption = Formula_A
End If
Next
then I cut the "CDbl"
For i = 1 To 5
If Me.Controls("CheckBox" & i) = True Then
Formula = Formula + CDbl(Me.Controls("TextBox" & i).Text) & "*(1+" & CDbl(Me.Controls("TextBox" & i + 1).Text) & "/100)"
Me.Controls("Label" & i + 38).Caption = Formula_A
End If
Next
the result is: I have the formula displayed in an label text but not solved (ex. 10*(1+10/100))-so it is like an text. Can be solved mathematically?
thx for input