Hi there. Excuse me if this thread already exists, I just wasn't able to find a solution quite like I needed.
Essentially, I want to record a macro that when you press a command button, It imports data from an external excel file that has constantly changing data (essentially a new file is downloaded every single week with different data and renamed to fit the name with which the code is configured around so it'll work with the macro). What I recorded doing is importing data from an excel file and loading it to the current worksheet. Then I stopped recording, and deleted all of the data imported (so the next time I open the file I can import new data). The problem is, when I reopen the file to test it and run the macro, I get a run time error that says query with this sheet name already exists. I'm new to VBA so I don't really understand what that means.
Any help is appreciated!
I would attach my code but it contains confidential information so please don't ask!
Bookmarks