I'm trying to sum the value in 7 text boxes where the value of their coinciding combo box = "Interact". When I test this code, I get the following error:
"Compile Error: Procedure declaration does not match description of event or procedure having the same name."
The responses that I'm seeing after googling the issue, don't make any sense to me. They all seem to be related to the tile of the Private Sub, but this is how I've summed text box values in the past. Albeit, the actual calculation in other summing events didn't have an IF statement involved.
What do I need to do differently here?
"Compile Error: Procedure declaration does not match description of event or procedure having the same name."
The responses that I'm seeing after googling the issue, don't make any sense to me. They all seem to be related to the tile of the Private Sub, but this is how I've summed text box values in the past. Albeit, the actual calculation in other summing events didn't have an IF statement involved.
What do I need to do differently here?
Code:
Private Sub CalcInteractRefund()
If Me.cobo_FeeType1.Value = "Interact" Then
Me.txt_InteractRefund.Value = Val(Me.txt_FeeAmt1.Text)
ElseIf Me.cobo_FeeType2.Value = "Interact" Then
Me.txt_InteractRefund.Value = Val(Me.txt_InteractRefund.Text) + Val(Me.txt_FeeAmt2.Text)
ElseIf Me.cobo_FeeType3.Value = "Interact" Then
Me.txt_InteractRefund.Value = Val(Me.txt_InteractRefund.Text) + Val(Me.txt_FeeAmt3.Text)
ElseIf Me.cobo_FeeType4.Value = "Interact" Then
Me.txt_InteractRefund.Value = Val(Me.txt_InteractRefund.Text) + Val(Me.txt_FeeAmt4.Text)
ElseIf Me.cobo_FeeType5.Value = "Interact" Then
Me.txt_InteractRefund.Value = Val(Me.txt_InteractRefund.Text) + Val(Me.txt_FeeAmt5.Text)
ElseIf Me.cobo_FeeType6.Value = "Interact" Then
Me.txt_InteractRefund.Value = Val(Me.txt_InteractRefund.Text) + Val(Me.txt_FeeAmt6.Text)
ElseIf Me.cobo_FeeType7.Value = "Interact" Then
Me.txt_InteractRefund.Value = Val(Me.txt_InteractRefund.Text) + Val(Me.txt_FeeAmt7.Text)
End If
End Sub
Private Sub txt_FeeAmt1_Exit()
Call CalcInteractRefund
End Sub