Be careful when you use Dim with variables separated by commas. Only the last one will be a string type. The other ones will be Variant type as, by default, if you don't give the variable a type, VBA will do it as variant for you.
So, you can dim them as
Dim Date1 As Date
Date2 As Date...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.