IEnumerable is a collection of items. So it is similar to an array, list, etc. In this case, it as an ienumerable of string (which is what you want) because you are enumerating over all of the file paths.
The reason why it didn’t work when you changed it to
… <> now.month and now.year) is because the and operator isn’t comparing anything on the right side. Every time you add an OR or AND statement, you need to compare 2 specific booleans. Right now you’re checking the file’s modification month to the current month. But when you put in AND in there, you need to specify again that you want to check the file’s modification year in comparison to the current year. So you need to instead put:
timecheck (as iEnumerable<string>) = Directory.GetFiles(“C:…\Documents\TESTfolder”, "file_* .xlsx").Where(Function (a) File.GetLastWriteTime(a).month <> Now.month AndAlso File.GetLastWriteTime(a).year <> Now.year)
NOTE: I used AndAlso instead of a simple AND. AndAlso (along with OrElse instead of Or) is called lazy evaluation. This means it will check the first statement and only continue if it is true. If you use a regular AND, then it will check all statements even if it finds a false right away. I use AndAlso (and OrElse) 99% of the time because this can save a decent amount of processing time depending on your workflow.