The For Each construct can only be used with collections and arrays. This error has the following cause and solution:
Check the spelling of the item over which you want to iterate to make sure it corresponds to a collection or array in scope in this part of your code.
For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).