+ Reply to Thread
Results 1 to 4 of 4

Check if input is a number or text

  1. #1
    Registered User
    Join Date
    11-28-2006
    Posts
    63

    Question Check if input is a number or text

    Hi,

    I have an textbox on an excel form that requires the user to input a number. Is there a statement that I can use in my VBA to check if the value is a number or text prior to applying it to a formula.

    Soma104
    Last edited by soma104; 03-23-2010 at 01:25 PM.

  2. #2
    Valued Forum Contributor mdbct's Avatar
    Join Date
    11-11-2005
    Location
    CT
    MS-Off Ver
    2003 & 2007
    Posts
    848

    Re: Check if input is a number or text

    The IsNumeric function should do the trick
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-28-2006
    Posts
    63

    Re: Check if input is a number or text

    Thank you, that's exactly what I needed.

    Soma104

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Check if input is a number or text

    How about not allowing any input in your Textbox, other than numbers?

    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