+ Reply to Thread
Results 1 to 9 of 9

How to pop up message when user enters any text in TextBox. Should be enter by number only

  1. #1
    Forum Contributor
    Join Date
    08-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2007, MS 365 (Windows 10 Pro 64-bit)
    Posts
    818

    How to pop up message when user enters any text in TextBox. Should be enter by number only

    Hello All,
    How to pop up message "Please enter number only" when user enters any text in TextBox. Should be enter by number only.

    Regards,
    tt3
    Last edited by tuongtu3; 02-21-2013 at 02:28 AM. Reason: Solved

  2. #2
    Valued Forum Contributor
    Join Date
    08-13-2012
    Location
    Gardony, Hungary
    MS-Off Ver
    Excel 2003
    Posts
    558

    Re: How to pop up message when user enters any text in TextBox. Should be enter by number

    Hi tuongtu3,

    here's an example procedure that only accepts numbers:
    Please Login or Register  to view this content.
    And a link with some explanation and more examples:
    http://www.ozgrid.com/VBA/inputbox.htm

  3. #3
    Forum Contributor
    Join Date
    08-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2007, MS 365 (Windows 10 Pro 64-bit)
    Posts
    818

    Re: How to pop up message when user enters any text in TextBox. Should be enter by number

    I will look into it and thank you for your info but I need number only in TextBox.

    Regards,
    tt3

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: How to pop up message when user enters any text in TextBox. Should be enter by number

    Hi tt3

    Perhaps this
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: How to pop up message when user enters any text in TextBox. Should be enter by number

    Do you want a msgbox or just ignore the keystoke other than numbers etc?
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    08-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2007, MS 365 (Windows 10 Pro 64-bit)
    Posts
    818

    Re: How to pop up message when user enters any text in TextBox. Should be enter by number

    Hi all,
    Please look at the sample in attached and help me.

    Regards,
    tt3
    Attached Files Attached Files

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: How to pop up message when user enters any text in TextBox. Should be enter by number

    Just add to a userform module.
    Please Login or Register  to view this content.
    So that the user can not enter anything other than Numbers, Enter, Tab, BackSpace, Left/Right Arrow.

  8. #8
    Forum Contributor
    Join Date
    08-12-2010
    Location
    Excel World
    MS-Off Ver
    Excel 2013, 2019 & O365
    Posts
    214

    Re: How to pop up message when user enters any text in TextBox. Should be enter by number

    Hi tuongtu3,

    You can try this one too.... works fine. You need to modify a bit for your textbox requirements.

    Please Login or Register  to view this content.
    Excelforum is Completely Awesome! True learning with Live Examples & Best Techniques!!

  9. #9
    Forum Contributor
    Join Date
    08-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2007, MS 365 (Windows 10 Pro 64-bit)
    Posts
    818

    Re: How to pop up message when user enters any text in TextBox. Should be enter by number

    @Jindon: The Code work perfect with the userform sample.
    @SunOffice; RHCPgergo; jaslake: I will use be using these codes for something else.

    Thank you very much for your time and help.

    Regards,
    tt3

+ 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