+ Reply to Thread
Results 1 to 5 of 5

Data validation for Inputbox

  1. #1
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Post Data validation for Inputbox

    hi,
    i want to add data validation for inputbox,
    i want inputbox value should not be greater then range("b3").value


    thank you
    Use Code-Tags for showing your code :
    Please mark your question Solved if there has been offered a solution that works fine for you
    If You like solutions provided by anyone, feel free to add reputation using STAR *

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Data validation for Inputbox

    Just test the value returned by the InputBox and then react accordingly. You can't actually add validation to the inputbox itself, other than basic type validation (numbers, ranges, text) if using Application.Inputbox.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Data validation for Inputbox

    Typically you check after value is entered before you proceed with rest of the code.

    Either, Exit Sub if invalid or use GoTo statement to bring them back to input box.

    Please Login or Register  to view this content.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  4. #4
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: Data validation for Inputbox

    Super Perfect
    CK76
    Its working as i need,,,
    and thank you xlnitwit

  5. #5
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Data validation for Inputbox

    You are welcome, and thanks for the rep

+ 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. [SOLVED] VBA Inputbox Validation rules
    By hydz1213 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-07-2022, 12:06 AM
  2. VALIDATION inputbox
    By superchew in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-11-2016, 01:40 AM
  3. [SOLVED] VBA InputBox Password Validation
    By mcmunoz in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 09-05-2013, 10:25 PM
  4. VBA Data validation on InputBox
    By Hilton1982 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-13-2012, 11:05 AM
  5. inputbox validation
    By pavlos in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-17-2010, 01:17 AM
  6. inputbox and data validation
    By jaujun in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-02-2007, 03:45 AM
  7. InputBox Validation?
    By PSKelligan in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-14-2005, 09:06 AM

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