For Each may not be used on array of user-defined type or fixed-length strings

   

For Each constructs are only valid for collections and arrays of intrinsic types, including arrays of objects. Also, arrays of fixed-length strings can't be iterated using For Each. This error has the following causes and solutions:

For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).