For at begynde et sted - henter UEFA - Slutspil:
Kopier nedenstående kode til en Excel-fil - i VBA (Alt+F11) - ThisWorkbook. Gem & Luk
Ved åbning af filen overføres den nævnte Web-side til Ark1.
Eller send en mail til pb@supertekst-it.dk - så sender jeg min fil.
Private Sub workbook_activate()
Dim svar
svar = MsgBox("Hent fra Bold.DK?", vbYesNo)
If svar = 6 Then
hentFraBold
End If
End Sub
Private Sub hentFraBold()
ActiveWorkbook.Sheets(1).Activate
Range("A1:z1000").Select
Selection.Clear
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;
http://bold.dk/uefacup/index.php?side=slutspil" _
, Destination:=Range("$A$1"))
.Name = "miniweb.page?magic=(cc (level1 1) (level3 5))"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.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
ActiveSheet.Columns.AutoFit
End Sub