+ Reply to Thread
Results 1 to 3 of 3

Error with Type Mismatch

  1. #1
    Registered User
    Join Date
    09-08-2009
    Location
    Glasgow
    MS-Off Ver
    Excel 2003 SP3
    Posts
    45

    Question Error with Type Mismatch

    Hey there, I am trying to check a user input to see if the user has entered the date correctly.

    I am using the code below but it keeps giving me a "Type Mismatch" error. Does anyone know where I am going wrong?

    Please Login or Register  to view this content.
    Any help would be greatly appreciated, thanks.

    Jag
    Last edited by therealjag; 02-17-2010 at 10:30 AM.

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

    Re: Error with Type Mismatch

    First time into the function the argument is blank,

    Try moving the test to the end of the loop

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

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Error with Type Mismatch

    Whenever a non-numeric string is passed to the date_check function the Cast to Date will generate a debug.

    Could you not allow any date format and simply format result per requirements, eg:

    Please Login or Register  to view this content.

    It's not clear how the string equivalent of the Date is being used but the strDate is there to demo the principle.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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