This is about to drive me nuts so any help is greatly appreciated. I have captured the datelastmodified value from files in a directory and stuck them into an array. I'm then comparing the file name and value from the array with corresponding values in a text file. I want to compare them and if the one in the text file is older, replace it with the value from the array. However, I receive the type mismatch error when using datediff. I've used datediff and sometimes get the same message. If I use vartype a value of 7(date) is returned. Someone please offer some suggestions so I can remain sane. Thanks.