+ Reply to Thread
Results 1 to 2 of 2

Type Mismatch

  1. #1
    Registered User
    Join Date
    02-24-2007
    Posts
    25

    Type Mismatch

    I'm getting an error 13: Type Mismatch, and I'm not sure why.
    This is the piece of code that seems like is creating the problem:

    Please Login or Register  to view this content.
    and it's the last if...then statement that is giving the type mismatch error, where activecell.offset(count-1,0) >= activecell.offset(count-1,1) is comparing two cells containing integer values and the timevalue function is comparing now() to the time value in activecell.offset(count-1,8) + 24hours. I see that the problem might come first setting the cell to 0 in the first if...then statement, but what else could I declare that cell first that would be possible to put into the timevalue function so it's the same type?

    Thanks in advance,

    Cruzader
    Last edited by cruzader777; 03-19-2007 at 12:49 AM.

  2. #2
    Forum Contributor
    Join Date
    01-24-2007
    Location
    Southampton, UK
    Posts
    137
    Problem appears to be the TimeValue("24:00:00") term, as 24:00 hours doesn't exist (it's 00:00 hours). Suggest you use TimeValue("23:59:59") instead.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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