Bekijk de onderstaande video om te zien hoe je onze site als een web app op je startscherm installeert.
Opmerking: Deze functie is mogelijk niet beschikbaar in sommige browsers.
Sub VenA()
Application.ScreenUpdating = False
Sheets(2).Cells.Clear
With Sheets(1)
.Cells.Clear
For j = 1 To 364
If j = 1 Then c00 = "ticker" Else c00 = "ticker&r=" & (j * 20) + 1
.QueryTables.Add(Connection:="URL;http://www.finviz.com/screener.ashx?v=111&o=ticker" & c00, Destination:=.Range("$A$1")).Refresh BackgroundQuery:=False
ar = .Range("A24:K43")
ReDim ar1(1 To 20, 1 To 6)
For jj = 1 To UBound(ar)
If IsNumeric(ar(jj, 1)) And ar(jj, 1) <> "" Then
ar1(jj, 1) = ar(jj, 2)
ar1(jj, 2) = Replace(ar(jj, 9), ".", ",")
ar1(jj, 3) = Replace(ar(jj, 11), ",", "")
ar1(jj, 4) = Format(Now, "hh:mm:ss")
ar1(jj, 5) = Date
ar1(jj, 6) = ar(jj, 10)
End If
Next jj
Sheets(2).Cells(Rows.Count, 1).End(xlUp).Offset(1).Resize(20, 6) = ar1
Next j
End With
End Sub
Het grote waarom is dat je er niets aan hebt. Als je niet rechtstreeks toegang hebt tot de data dan wordt het volgens mij niets anders dan per pagina de data binnen te halen. Bij 364 pagina's gaat dat wel even duren.
Code:Sub VenA() Application.ScreenUpdating = False Sheets(2).Cells.Clear With Sheets(1) .Cells.Clear For j = 1 To 364 If j = 1 Then c00 = "ticker" Else c00 = "ticker&r=" & (j * 20) + 1 .QueryTables.Add(Connection:="URL;http://www.finviz.com/screener.ashx?v=111&o=ticker" & c00, Destination:=.Range("$A$1")).Refresh BackgroundQuery:=False ar = .Range("A24:K43") ReDim ar1(1 To 20, 1 To 6) For jj = 1 To UBound(ar) If IsNumeric(ar(jj, 1)) And ar(jj, 1) <> "" Then ar1(jj, 1) = ar(jj, 2) ar1(jj, 2) = Replace(ar(jj, 9), ".", ",") ar1(jj, 3) = Replace(ar(jj, 11), ",", "") ar1(jj, 4) = Format(Now, "hh:mm:ss") ar1(jj, 5) = Date ar1(jj, 6) = ar(jj, 10) End If Next jj Sheets(2).Cells(Rows.Count, 1).End(xlUp).Offset(1).Resize(20, 6) = ar1 Next j End With End Sub
We gebruiken essentiële cookies om deze site te laten werken, en optionele cookies om de ervaring te verbeteren.