Results 1 to 2 of 2

Vlidating barcode scanner data entry in a text box, by If function

Threaded View

  1. #1
    Registered User
    Join Date
    07-31-2012
    Location
    ofirles and
    MS-Off Ver
    Excel 2003
    Posts
    2

    Vlidating barcode scanner data entry in a text box, by If function

    Hi all,
    I have a userform, which is updated by a barcode reader.
    When i want to validate one of these textboxes which has to have a fixed input, i can not use "else".
    the code is as below,
    Public Sub endtxtbx_Change()
        If endtxtbx.Value = "11EF" Then
                'some codes here
        End If
    End Sub
    i want to show a msgbox after else, something like,
    Public Sub endtxtbx_Change()
        If endtxtbx.Value = "11EF" Then
                'some codes here
        else
            MsgBox "Invalid Input"
        End If
    End Sub
    but, when i do so, it'll only show the Msgbox by any changes.

    Any Idea where is the problem, or what is the solution to do something like this?
    Last edited by arlu1201; 07-31-2012 at 11:41 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1