Bug with Macro Local Variables when looped inside a Function

This solution helped me! Thank you.

Such a weird bug!
I had a problem using strings outside of functions with For Each Loop. Adding the macro to a function by itself worked.