What's Wrong in my code

What's wrong in my code?
The code would not identify the exact figure of the txtbox.
example if my Amntdue is 105 then AmntPaid is 104 it will not exit sub which supposed to exit sub

Private Sub cmdNext_Click()
    If AmntDue.text > Trim(AmntPaid) Then
        MsgBox "Hello"
            Exit Sub
                End If
End Sub

Open in new window

Whing Dela CruzAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
bmatumburaConnect With a Mentor Commented:

Private Sub cmdNext_Click()
    If CDBl(AmntDue.text) > CDBl(Trim(AmntPaid)) Then
        MsgBox "Hello"
            Exit Sub
                End If
End Sub

Open in new window

0
 
Whing Dela CruzAuthor Commented:
Thanks to you,
the code is working
More power!
0
All Courses

From novice to tech pro — start learning today.