Sub METAR(ICAO As String, Rg As Range)
If ICAO = «  » Then Exit Sub Else Set Wb = Workbooks.Add
On Error Resume Next

With Wb.Sheets(1)
With .QueryTables.Add(« URL;http://www.acukwik.com/AirportInfo/ » & ICAO, .[A1])
.AdjustColumnWidth = False
.FieldNames = False
.PreserveFormatting = True
.RefreshStyle = xlOverwriteCells
.Refresh False
End With

Set Rf = .UsedRange.Find(« METAR: », , xlValues, xlWhole)
If Not Rf Is Nothing Then Rg.Value = Rf.End(xlToRight)
End With

Wb.Close False
End Sub

Share This