+ Reply to Thread
Results 1 to 6 of 6

Restrict Textbox entry

  1. #1
    Registered User
    Join Date
    01-21-2004
    Location
    Liverpool
    MS-Off Ver
    2003
    Posts
    88

    Restrict Textbox entry

    Hello all

    My mind is blank and i need a little help

    With the text box in a vba form can you restrcit the values a user can enter.

    If the use types a character then nothing appears only when they type a number it appears.

    I don't want it to validate using a command button just to restrict what a user can enter.

    Thanks in adavnce
    regards
    Paul
    http://www.frontlineuk.com
    FrontLineUK

  2. #2
    Registered User
    Join Date
    05-04-2006
    Posts
    24

    properties

    this option is in the properties window of the object.

  3. #3
    Registered User
    Join Date
    01-21-2004
    Location
    Liverpool
    MS-Off Ver
    2003
    Posts
    88
    Not sure where this property is as it does not appear in the properties table

  4. #4
    Registered User
    Join Date
    01-21-2004
    Location
    Liverpool
    MS-Off Ver
    2003
    Posts
    88
    I should be a bit more specific.

    when the use goes to typ a character into the text box nothing happens, but when they type a number it appears

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Normally I would use the TextBox_Exit routine

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  6. #6
    Forum Contributor stevebriz's Avatar
    Join Date
    09-07-2006
    Location
    Santiago Chile
    Posts
    389
    PaulUK,
    Here is the code I put in the textbox keydown event and the correxpoding function.
    There are a number of options to ht functions so you can configure it do do what you want
    HTH
    Steve


    Please Login or Register  to view this content.

    and the function:

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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