+ Reply to Thread
Results 1 to 4 of 4

Numeric Textbox that accepts negative sign (-)

  1. #1
    Forum Contributor Axmed.cm's Avatar
    Join Date
    02-05-2015
    Location
    Somalia
    MS-Off Ver
    2013
    Posts
    231

    Numeric Textbox that accepts negative sign (-)

    Hi Everyone.

    Can anyone help me have a code for a numeric textbox that accepts minus (negative) sign.
    Thanks in advance.
    GUURE

  2. #2
    Forum Contributor
    Join Date
    02-12-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2007
    Posts
    275

    Re: Numeric Textbox that accepts negative sign (-)

    If you are reffering to a textbox in a form - ALL textboxes are always text and as such will accept all value if you want to use the data within as numbers you will need to convert it to one of the number formats
    ie:
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor Axmed.cm's Avatar
    Join Date
    02-05-2015
    Location
    Somalia
    MS-Off Ver
    2013
    Posts
    231

    Re: Numeric Textbox that accepts negative sign (-)

    Thanks for your reply.

    it is in userform.
    I used this code

    Please Login or Register  to view this content.
    but unfortunately it also rejects negative values.
    is there any solution to accept it??

    thanks

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,485

    Re: Numeric Textbox that accepts negative sign (-)

    add some additional checks

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. TextBox that only accepts integers
    By Chaba in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-24-2014, 12:43 PM
  2. Multiplying a numeric value textbox by a duration value textbox
    By chrisjames25 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-01-2013, 05:05 AM
  3. Replies: 1
    Last Post: 04-26-2012, 12:48 AM
  4. negative numbers w/o negative sign
    By whtbullitt in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-31-2009, 05:07 AM
  5. Textbox accepts alpha only
    By LeLi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-02-2005, 04:05 AM
  6. Replies: 4
    Last Post: 06-24-2005, 05:05 PM
  7. TextBox that only accepts integers?
    By Claud Balls in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-04-2005, 07:06 PM

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