I have created a macro that will import external data from a USB drive using a querytable. The problem is that after the info is imported from the USB drive, then the "Safely Remove Hardware" option doesn't work for the USB drive. I am guessing the Excel is still using the USB drive, as once Excel is closed, then the "Safely Remove Hardware" option is viable again.
What I need is to be able to automatically re-enable the "Safely Remove Hardware" feature without having to close Excel, or without having to close the worksheet. What I think I need is some way to end the querytable connection from the worksheet to the USB drive.
I don't need to be able to constantly refresh the query. Once the query is performed the first time, and once the data I need in imported, then I am done with importing data.
Is there such thing as using a "querytable.quit" in my VBA code?
Thank you in advance!
Bookmarks