Consulting

Results 1 to 3 of 3

Thread: cdate type mismatch

  1. #1

    cdate type mismatch

    I'm getting a type mismatch on CDate(.Date1). When I hover my cursor over the error, it displays "", meaning nothing to evaluate. I get this error whenever I close my userform. Is there an alternative or may a way for it not to ignore it?

  2. #2
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location
    "Is there an alternative or may a way for it not to ignore it?"

    Hi Aviator,

    The error is obviously not being ignored, what do you mean?

  3. #3
    VBAX Expert shrivallabha's Avatar
    Joined
    Jan 2010
    Location
    Mumbai
    Posts
    750
    Location
    If the above statement works fine otherwise (i.e. except at the closing userform) then you can force VBA to ignore the error for this statement by something like:
    [VBA]On Error Resume Next
    'Your Code here which errors at closing
    On Error GoTo 0[/VBA]
    Regards,
    --------------------------------------------------------------------------------------------------------
    Shrivallabha
    --------------------------------------------------------------------------------------------------------
    Using Excel 2016 in Home / 2010 in Office
    --------------------------------------------------------------------------------------------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •