I have a program that opens up a file, pulls data from it, and puts said data into the corresponding worksheet based on the some information form the file it opens (that part isn't important). I have a Power Query that tells me the names and locations of all the files within a specified folder.
The macro will open the sheet with the power query and begin opening/closing and pulling the data from the files one at a time. Up until now, it has run smoothly. However, today I received an error saying "ActiveX Control can't create object." I have never seen this error before. When I go to Debug, it shows me the line with the error:
ThisWorkbook.Worksheets("Query1").Activate
I am unsure as to why it would all of the sudden be erroring out. Any ideas?