Data - Get External Data - Import Text File
Posted by SJC on March 23, 2001 5:36 PM
I recorded a macro that refreshes data that's imported from a text file into Excel. Here are the code lines:
Range("B1").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
My problem is: each time I run the macro, Excel asks me for the name of the text file to import. How can I set the name of that text file in the code so that Excel doesn't ask me for that info each time I run the macro?