+ Reply to Thread
Results 1 to 3 of 3

Errortrap wrong date entry

  1. #1
    Registered User
    Join Date
    08-15-2019
    Location
    Offaly, Ireland
    MS-Off Ver
    Office 2016
    Posts
    14

    Errortrap wrong date entry

    Hi all,

    I have a workbook where as part of a sorting solution I am asking the user for a date input in a message box. However I want to error trap if the date is entered in the wrong date format. Currently, the part of my code just contains the following...
    Please Login or Register  to view this content.
    However, if the incorrect format is entered, I get a type mismatch. Can anyone advise on how to trap this error and ask he user to input a correct format date?

    Thanks in advance,

    Karl
    Last edited by Leith Ross; 01-27-2020 at 09:03 PM. Reason: Added Code Tags

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

    Re: Errortrap wrong date entry

    Please Login or Register  to view this content.
    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
    Registered User
    Join Date
    08-15-2019
    Location
    Offaly, Ireland
    MS-Off Ver
    Office 2016
    Posts
    14

    Re: Errortrap wrong date entry

    Thank you so much AlphaFrog, that seems to work perfectly!!

+ 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] Clear contents of wrong entry
    By fabian_76 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-12-2019, 08:03 PM
  2. Replies: 16
    Last Post: 05-22-2019, 10:32 AM
  3. [SOLVED] Combobox Time Entry results in wrong calculations
    By SHUTTEHFACE in forum Excel General
    Replies: 11
    Last Post: 12-04-2014, 10:49 PM
  4. Vba help needed to check date and time entry and correct if wrong
    By markharris2004 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-13-2014, 05:06 PM
  5. Excel 2007 : Date entry is wrong
    By Attila in forum Excel General
    Replies: 4
    Last Post: 01-02-2010, 09:47 PM
  6. automatic erasing of field entry and date entry
    By roadkill in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-24-2008, 10:20 AM

Tags for this Thread

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