+ Reply to Thread
Results 1 to 5 of 5

Type mismatch for date extracted from string

  1. #1
    Forum Contributor
    Join Date
    12-25-2011
    Location
    Lahore, Punjab, Pakistan
    MS-Off Ver
    Excel 2010
    Posts
    287

    Type mismatch for date extracted from string

    I get type mismatch error when code tries to add 1 to SDate that I have set as a date


    Please Login or Register  to view this content.
    Value in cell A1 is [13 Dec 17 21:40:22 TAG 9B (TSI) CR=1: b1=e8, b2=0]
    Last edited by caabdul; 03-03-2018 at 02:46 AM.

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Type mismatch for date extracted from string

    You haven't declared SDate as date, you've effectively declared it as Variant. try
    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Type mismatch for date extracted from string

    Or

    I do not know what is "ShiftDta."?
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    12-25-2011
    Location
    Lahore, Punjab, Pakistan
    MS-Off Ver
    Excel 2010
    Posts
    287

    Re: Type mismatch for date extracted from string

    @ Fluff13. Thanks, it works
    @ AB33, thanks for an alternative idea

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Type mismatch for date extracted from string

    Glad to help & thanks for the feedback

+ 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. type mismatch, for string/value
    By slemieux99 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-13-2017, 11:58 AM
  2. [SOLVED] Getting Type Mismatch with String passed to a Function with String parameter
    By allansy8 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-30-2014, 10:33 PM
  3. Replies: 0
    Last Post: 05-29-2014, 09:38 AM
  4. ODBC SQL string - type mismatch
    By spike1988 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-25-2013, 06:41 PM
  5. Error passing element of string array get ByRef argument type mismatch
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-17-2011, 02:59 PM
  6. Testing value of string but its a number........gives type mismatch error
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-18-2011, 05:06 PM
  7. Type mismatch. How do combine a string and a number to make a range?
    By 111StepsAhead in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-21-2011, 11:17 AM

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