Zaraki_Kenpachi
Member
What are you trying to do with temp? If it's an uninitialized variable and you don't have Option Explicit on, it will default to 0 and your comparison be true when linkcash doesn't contain 2014-04. You're essentially saying
Code:If 0 = 0 Then MsgBox "April 2014" End If
I'm just using it as a variable to hold the value of 0 or whatever it finds. Can I just do linkcash = instr(etc....?
Do I have to give a default value? I declare it as a string but then I get my error message of invalid date...