刷新BackgroundQuery:= False |需要帮助? [英] Refresh BackgroundQuery:=False | help needed?
本文介绍了刷新BackgroundQuery:= False |需要帮助?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我看过其他一些犯同样错误的人,但是他们的解决方案对我没有帮助。
I've looked at some others with the same error but their solution doesn't help me.
刷新BackgroundQuery:= False
错误1004
这是我的代码
'
' LoadData Macro
'
'
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;Macintosh HD:Users:Karrar:Desktop:Excel.txt", Destination:=Range("A1"))
.Name = "Excel"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.RefreshOnFileOpen = False
.BackgroundQuery = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = False
.TextFilePromptOnRefresh = False
.TextFilePlatform = xlMacintosh
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = True
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = True
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
.UseListObject = False
.Refresh BackgroundQuery:=False
End With
End Sub
推荐答案
尝试以下行
ActiveSheet.Range("A1").QueryTables(1).Refresh BackgroundQuery:=False
或
ActiveSheet.QueryTables(1).Refresh BackgroundQuery:=False
这篇关于刷新BackgroundQuery:= False |需要帮助?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文