Solved

What's Wrong in my code

Posted on 2009-04-02
2
230 Views
Last Modified: 2012-05-09
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
Comment
Question by:Whing Dela Cruz
2 Comments
 
LVL 11

Accepted Solution

by:
bmatumbura earned 500 total points
ID: 24049593

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
 

Author Closing Comment

by:Whing Dela Cruz
ID: 31565773
Thanks to you,
the code is working
More power!
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Link a textbox in excel to a cell with more than 255 characters. 5 84
Problem to skip loop 6 57
Excel object stays open 19 73
How to Add / Edit Windows Menu 4 59
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question