Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 245
  • Last Modified:

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

0
Whing Dela Cruz
Asked:
Whing Dela Cruz
1 Solution
 
bmatumburaCommented:

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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now