여러 웹 페이지에서 데이터를 추출하는 데 Excel 웹 쿼리를 사용하려고합니다.Excel 웹 쿼리 - 10 회 이후의 제한 시간
이"런타임 오류 1004 :이 인터넷 사이트에 URL.The 연결을 열 수 없습니다 할당보다 더 오래 걸렸다
코드는 내가 오류 메시지가 후 처음 10 개 루프에 대해 잘 실행
: 내가 어떤 pointers.The 웹 사이트 링크를 부탁드립니다
시간 "전체 코드는 다음과 같습니다 here
입니다
Sub DataPull()
Dim page As Integer
Dim Summary As Worksheet
Dim Query As Worksheet
Dim x As Integer
Dim n As Integer
Set Summary = ActiveWorkbook.Sheets("Summary")
Set Query = ActiveWorkbook.Sheets("Query")
x = 2
For n = 1 To 11
With
Query.QueryTables.Add(Connection:="URL;http://www.skmm.gov.my/link_file/registers1/_
aa2.aspcc=83885232640314699294053&vl=&aa=celcom_cell&fpg=" &n,_
Destination:=Query.Cells(1, 1))
.Name = "aa2.asp?cc=83885232640314699294053&vl=&aa=celcom_cell&fpg=1"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = False
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Query.Range("A6:H35").Copy Destination:=Summary.Range("A" & x)
x = x + 30
Query.QueryTables(1).Delete
Next n
End Sub`