Sub Macro1()
Dim calc As Range, y As Range, x As Integer
'Calculate the number of values in a column
Set calc = Range("A:A").Find(" ", , xlValues, xlWhole, , , False)
Set y = Range("A1")
'Find line offset of the last cell in the column A
x = Range("A" & Application.Rows.Count).End(xlUp).Row
For i = 1 To x
' Add a sheet and open an HTML report------------------------------------------------------------------------
Worksheets.Add
With ActiveSheet.QueryTables.Add(Connection:= _
"FINDER;file:///C:/_U1/PROGRAMME/NI_8.5/PROGRAMME_LV85/Report/" & Range("A" & i).Value & ".html", Destination:=Range("A1"))
.Name = "HTML_TEST(1)"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.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
.Delete
End With