I am importing a text file using Data -> From Text. I would like to be able to refresh this using the code
Sub QueryN(SheetName As String, n)
Application.DisplayAlerts = False
On Error Resume Next
Range(SheetName & "_Summary" & n).QueryTable.Refresh BackgroundQuery:=False
Application.DisplayAlerts = True
End Sub
This which once worked, no longer does. If I right click on the table in Excel the Refresh option is greyed out.
The only change I am aware of is that I have unchecked Prompt for File Name in DataRange Properties, which was available to me before the problem started.
Will this have caused my problem? If it has how do I allow my users to download the text file without knowing its name (which they will not)?
Bookmarks