+ Reply to Thread
Results 1 to 2 of 2

Leaving UserFrom Fields Blank on Purpose: Mismatch Error

  1. #1
    Registered User
    Join Date
    10-05-2016
    Location
    Pensacola, FL
    MS-Off Ver
    Excel 2013
    Posts
    1

    Smile Leaving UserFrom Fields Blank on Purpose: Mismatch Error

    Hi Guys,

    I'm building a user-form for my company. Everything is working fine except I'm not able to leave fields blank that are being used for a DateDiff function. What kind of If Function do I have to use so that excel knows it is okay if certain fields are blank.

    Thank you!

    Please Login or Register  to view this content.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Leaving UserFrom Fields Blank on Purpose: Mismatch Error

    Depends on what you want in the cell if a date field is blank. If you want it to be blank, here is one example:

    Please Login or Register  to view this content.
    You may also need to consider error input:
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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] Blank cell gives error 13 (Mismatch) in loop - edit code to accommodate for blanks
    By onmyway in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-17-2015, 07:35 AM
  2. Replies: 11
    Last Post: 09-15-2014, 02:36 AM
  3. Replies: 1
    Last Post: 05-14-2014, 05:02 AM
  4. Need help on leaving blank cell on error and continuing macro
    By WinningKing in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2014, 02:09 AM
  5. [SOLVED] Insert blank rows by a userfrom
    By Danielle22 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-17-2013, 08:21 AM
  6. Replies: 8
    Last Post: 01-28-2013, 01:10 AM
  7. [SOLVED] Type mismatch on a date textbox when leaving it blank
    By shardin in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-26-2012, 05:25 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