I have a loop which activates a certain file and copies data; it is not working and i cannot see why. Please see below:
For Each w In Workbooks
If w.Name Like "*File 1*" Then
Windows(w.Name).Activate
Sheets("Test").Range("C7:C15").Copy
End If
Exit For
Next w
The wildcard is there because in reality, each week the name of the file will change from "File 1 - week1" to "File 1 - week2", and so on. The point is, the vode stops at the like operator line, so presuming an issue with the "File 1"?
Any help greatly appreciated