I am writing a spread sheet to be placed on several individual work stations on a network. The main data sheets are kept as textfiles on the server and called down to the work station on opening the application
This is done using the following code:-
Function QueryOnly(SheetName As String)
On Error Resume Next
Application.DisplayAlerts = False
Sheets(SheetName).Range("G7").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
Application.DisplayAlerts = True
End Function
This works OK except it always generates a message window asking which file do we want to import. There are three text files dealt with this way, but I think that the QueryTables would define which text file to search for.
I have tried putting each textfile in its own separate path, this didn't help.
My question is. How can I eliminate this message?
The query ranges are dynamically named using "SheetName_Table" as the name
Thank you in anticipation
j_Southern
Bookmarks