+ Reply to Thread
Results 1 to 7 of 7

Data Validation Error Message

  1. #1
    Forum Contributor
    Join Date
    04-16-2014
    Location
    Australia
    MS-Off Ver
    Excel 365
    Posts
    125

    Data Validation Error Message

    When using Data validation the standard error message comes up as:

    "Retry" "Cancel" "Help"

    Is it possible to only allow "cancel" or better still would be for the macro to automatically cancel after giving a message "Invalid data entry, please re-enter correct data"?
    With only an "OK" button as an option.

    Thank you.

    Yoepy

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Data Validation Error Message

    What's the validation criteria?
    What cell(s) have the validation?
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    04-16-2014
    Location
    Australia
    MS-Off Ver
    Excel 365
    Posts
    125

    Re: Data Validation Error Message

    I have a range of cells that can only accept data that is included in the "ValidCodes" range (which is on a different sheet)

    So; Allow:List Source:=ValidCodes

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Data Validation Error Message

    Why would you need to change how this works now? If you enter the wrong stuff, it tells you - if you press escape, you can try again?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Forum Contributor
    Join Date
    04-16-2014
    Location
    Australia
    MS-Off Ver
    Excel 365
    Posts
    125

    Re: Data Validation Error Message

    There is a separate macro that registers key strokes, so if the user hits "Retry", it gets counted again. Hence I want to eliminate the choice. If it was only me using it, it would not be a problem.

  6. #6
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Data Validation Error Message

    Quote Originally Posted by Yoepy View Post
    I have a range of cells that can only accept data that is included in the "ValidCodes" range (which is on a different sheet)

    So; Allow:List Source:=ValidCodes
    I assumed it was a range of cells.

    Try this.
    • Right-click on the sheet tab that has the validation range needed
    • Select View Code from the pop-up context menu
    • Paste the code from below in the worksheet's code module
    • Change the Range (red) to your validation range of cells.


    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    04-16-2014
    Location
    Australia
    MS-Off Ver
    Excel 365
    Posts
    125

    Re: Data Validation Error Message

    Thanks AlphaFrog. I was coming at the problem from the wrong direction. That is very logical.

+ 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] Automate pop-up error message for data validation purposes
    By karl8695 in forum Excel General
    Replies: 2
    Last Post: 07-21-2014, 07:08 AM
  2. How to capture return value from data validation error message box
    By franklyn in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-13-2012, 01:57 PM
  3. Replies: 6
    Last Post: 04-09-2012, 02:26 PM
  4. Data Validation Error Message
    By Blake 7 in forum Excel General
    Replies: 11
    Last Post: 11-28-2010, 01:52 PM
  5. [SOLVED] Text Length Data Validation, without error message.
    By mark in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-18-2006, 10:25 PM
  6. [SOLVED] Another Data Validation question:Error message
    By Jeff in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-14-2005, 02:05 PM
  7. Error Message with Data Validation
    By Chet Hurd in forum Excel General
    Replies: 2
    Last Post: 06-09-2005, 04:05 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