Results 1 to 2 of 2

Thread: Splendid IsDate() behaviour!

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2002
    Location
    Grimsby (up the Mariners!)
    Posts
    45

    Exclamation Splendid IsDate() behaviour!

    Caught out by VBA this morning...

    VB Code:
    1. IsDate("2A")

    Returns "True". However,

    VB Code:
    1. IsDate("2A           ")

    also returns True. The same happens with 0A,1A,2A,3A, ... to 9A. You can have any number of spaces after the initial string.

    To get around it I changed the application code, which is formatting and pasting large arrays onto worksheets.

    Any other IsDate() problems I should be aware of?

  2. #2
    Hyperactive Member
    Join Date
    Apr 2001
    Location
    N42 29.340 W71 53.215
    Posts
    422

    "Splendid" ? Glad you like it

    Here are some other examples of IsDate = True
    "1305/03", "1-0", "9999-12"

    Does the same in VB6
    But, apparently fixed in VB.NET
    "The wise man doesn't know all the answers, but he knows where to find them."
    VBForums is one place, but for the really important stuff ... here's a clue 1Tim3:15

Posting Permissions

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



Click Here to Expand Forum to Full Width