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
...全文
1745 回复 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

5,172

社区成员

发帖
与我相关
我的任务
社区描述
其他开发语言 Office开发/ VBA
社区管理员
  • Office开发/ VBA社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧