I am getting a Refresh BackgroundQuery:=False error on different PC's. The code below works on my PC Excel 2010 everytime, but does not on 2 different machines. One is 2010 and the other is 2007. I have tried to add DoEvents and this line of code(Selection.ListObject.QueryTable.Refresh BackgroundQuery:=False) to replace but nothing seems to work. Can someone please help? Thank you.
Application.ScreenUpdating = False
Cells.Select
Selection.ClearContents
Range("A1").Select
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;C:\Program Files\Remote\rwnode\652\SUBSCRIB\Master\3560.~su", _
Destination:=Range("$A$1"))
.Name = "3560"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = False
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 437
.TextFileStartRow = 1
.TextFileParseType = xlFixedWidth
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
.TextFileFixedColumnWidths = Array(7, 32, 27, 10, 8, 5, 12, 12, 8, 8, 13, 9, 5, 11, 10, 9, _
7, 11, 8)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
Bookmarks