Private Sub cmdcalculate2_Click() Dim total2 As Currency Dim cufee1 As Currency Dim med2 As Currency Dim labexam1 As Currency cufee1 = Me.txtcufee1.Text [b]med2 = Me.txtmed2.Text[/b] labexam1 = Me.txtlabexam1.Text If cufee1 >= 0 And med2 >= 0 And labexam1 >= 0 Then total2 = Val((Me.txtcufee1.Text) + (Me.txtmed2.Text) + (Me.txtlabexam1.Text)) labeltotal2.Caption = total2 Exit Sub ElseIf cufee1 >= 0 And med2 >= 0 Then total2 = Val((Me.txtcufee1.Text) + (Me.txtmed2.Text)) labeltotal2.Caption = total2 Exit Sub ElseIf cufee1 >= 0 And labexam1 >= 0 Then total2 = Val((Me.txtcufee1.Text) + (Me.txtlabexam1.Text)) labeltotal2.Caption = total2 Exit Sub ElseIf cufee1 >= 0 Then labeltotal2.Caption = total2 Exit Sub End If End Sub
i have this code and the error is type mismatch and it points to the one that is in bold text .. can anyone help me in this ? please.. TNX :*
This post has been edited by Atli: 29 August 2012 - 11:57 PM
Reason for edit:: Use [code] tags when posting code.

New Topic/Question
Reply



MultiQuote






|