我在Excel中有一个从特定链接获取数据(html表)的宏,该宏可以正常运行4-5次,但之后会得到空白数据 . 但是,如果我再次录制该宏并运行它再次正常运行4-5次 . 我该如何解决这个问题?

添加下面的宏(这是一个录制的宏)

使用ActiveSheet.QueryTables.Add(Connection:= _ "URL;http" _,Destination:= Range("$A$3")) . Name = _“awadmin?commandname = appwatch&project = 60115-VENOM&I = 1&M =&q =&GO = Submit”.FieldNames = True . RowNumbers = False .FillAdjacentFormulas = True .PreserveFormatting = True .RefreshOnFileOpen = False .BackgroundQuery = True .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0.WebSelectionType = xlEntirePage .WebFormatting = xlWebFormattingNone .WebPreFormattedTextToColumns = True .WebConsecutiveDelimitersAsOne = True .WebSingleBlockTextImport = False .WebDisableDateRecognition = False .WebDisableRedirections = False .Refresh BackgroundQuery:= False End with //从URL获取数据

Cells.Replace What:="Display System Objects", Replacement:="", LookAt:= _
    xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
    ReplaceFormat:=False
Range("C8").Select