EXCEL运行宏时提示Refresh BackgroundQuery:=False 的错误,如何修改

tomkingpower 2020-05-31 11:06:51
之前下载一直下载双色球的下载表,用新电脑下载使用的时候提示Refresh BackgroundQuery:=False,如何解决
以下是宏数据:


Private Sub CommandButton1_Click()

Range("A3:AC3500").Clear

k3dshijihao = "http://182.92.109.149/getData/ssq.TXT"

d3s = "WData3D_All"

Cells(2, 1) = "开奖期号"
Cells(2, 2) = "开奖日期"
Cells(2, 3) = "红"
Cells(2, 4) = "号"
Cells(2, 5) = " "
Cells(2, 6) = " "
Cells(2, 7) = " "
Cells(2, 8) = " "
Cells(2, 9) = "蓝"

Cells(2, 10) = "红"
Cells(2, 11) = "号"
Cells(2, 12) = "出"
Cells(2, 13) = "球"
Cells(2, 14) = "顺"
Cells(2, 15) = "序"

Cells(2, 16) = "投注总额"
Cells(2, 17) = "奖池金额"

Cells(2, 18) = "一等注数"
Cells(2, 19) = "一等金额"

Cells(2, 20) = "二等注数"
Cells(2, 21) = "二等金额"

Cells(2, 22) = "三等注数"
Cells(2, 23) = "金额"

Cells(2, 24) = "四等注数"
Cells(2, 25) = "金额"

Cells(2, 26) = "五等注数"
Cells(2, 27) = "金额"

Cells(2, 28) = "六等注数"
Cells(2, 29) = "金额"

cz = k3dshijihao: czmc = d3s


With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;" & cz, Destination:=Range("A3"))
.Name = czmc
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = xlWindows
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = True
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = True
.TextFileColumnDataTypes = Array(1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
Range("A" & (Application.Count(Range("a1:a3000")))).Select
End





End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

End Sub
...全文
48 1 收藏 回复
写回复
回复

还没有回复,快来抢沙发~

发动态
发帖子
Office开发/ VBA
创建于2007-08-27

4459

社区成员

1.7w+

社区内容

其他开发语言 Office开发/ VBA
社区公告
暂无公告