Thank you very much Peter. Really appreciated. It is working fine. I did not want the queries to go to different sheets but I was able to modify the macro so it only moves from column to column after each query. Also, because the query brings 2 columns each time, I was able as well to modify it and delete the first column after each iteration. I know it is not perfect (my changes) but it is working now.
I have a last favor to ask: How could I position the cursor in cell b2, and then move one cell to the right for the next iteration and lastly, after this is done I would like to transpose the columns into rows in a different sheet.
Here is the code:
Sub Process()
Dim wb As Workbook
Dim I As Integer
Dim SheetNo As Integer
Set wb = ThisWorkbook
Selection.Delete Shift:=xlUp
ActiveCell.Select
SheetNo = 1
For I = 32 To 50
'wb.Worksheets(SheetNo).Activate
'wb.Worksheets(SheetNo).Cells.Clear
With ActiveSheet.QueryTables.Add(Connection:="URL;http://www.verbs.cat/es/conjugacion/" & I, Destination:=Range("$A$1"))
.Name = "QueryTable: " & I
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "2,3,4,5,8,9"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Columns(1).Delete Shift:=xlToLeft
Selection.Offset(, 1).Select
'SheetNo = 1
Next I
End Sub
The main idea is to be able to export the final results (the transposed data) to a Microsoft access database.
Million thanks !!!
Best Regards