之前的开奖数据都是正常的,但是这两天开始出现出现问题了,更新的时候,最下面数据不消除,更新过后就多出了几项,必须将数据全部删除,再更新才能恢复正常的开奖数据保持原来的位置不变,请问老师们这是什么原因,然后纠正
这是开奖的数据源---
Private Sub CommandButton1_Click()
Range("A3:Q8000").Clear
k3dshijihao = "http://www.17500.cn/getData/3d.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) = "金额"
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)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
Range("A" & (Application.Count(Range("a1:a8000")))).Select
End
End Sub