EXCEL运行宏时提示Refresh BackgroundQuery:=False 的错误,如何修改
之前下载一直下载双色球的下载表,用新电脑下载使用的时候提示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
以下是宏数据:
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
...全文
相关推荐
EXCEL宏编程实例.doc
EXCEL宏编程实例.doc
FactoryTalk View SE VBA 标签管理与事件驱动数据采集实战
FactoryTalk View SE 中的 VBA 并非传统办公自动化宏,而是深度集成于 HMI 运行时的工业级脚本引擎。其核心围绕标签(Tag)对象模型展开,依赖 OPC 数据服务与 Area 上下文,强调生命周期管理、Quality 状态校验和线程安全读写。技术价值在于实现 PLC 实时控制同步、轻量历史数据采集及高频状态批量提交,显著降低网络负载与数据不一致风险。典型应用场景包括按钮式逻辑控制、SQL Server 历史存档、交通灯状态监控等。本文聚焦 FactoryTalk View SE VBA
OpenClaw 2.6.4:Windows一键安装ROS2 Humble教学环境
ROS2(Robot Operating System 2)是机器人开发的核心中间件,其跨平台特性与模块化架构使其成为高校教学与工程实践的主流选择。然而在Windows环境下,传统安装常面临Python版本冲突、DLL加载失败、Qt渲染异常及WSL2依赖等系统级障碍。OpenClaw 2.6.4作为专为中文用户优化的便携式ROS2发行方案,通过预编译二进制、静态链接依赖、沙盒化环境变量与零配置启动机制,实现了ROS2 Humble在原生Windows上的‘开箱即用’。它不替代ROS2本身,而是封装了经社区验
Excel VBA操作练习
Excel 宏 VBA操作练习,数据读取,写入
如何用VBA自动刷新本地链接表.rar
自动刷新后台的数据库表!!是从别人那里下载下来试用后感觉不错!


Office开发/ VBA
