Helllo,

I am a very basic learner of vba coding of website scrapping, I want to get data from the website having multiple pages. I am using below code for that but getting data only of 1 page.

Code is as per below


Sub Macro1()
'
' Macro1 Macro
'
' Keyboard Shortcut: Ctrl+y
'
    Range("A3").Select
    With ActiveSheet.QueryTables.Add(Connection:= _
        "URL;https://sahakarayukta.maharashtra.gov.in/site/information/creditsociety.aspx" _
        , Destination:=Range("$A$3"))
        .Name = "creditsociety_1"
        .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 = """SitePH_grdSociety"""
        .WebPreFormattedTextToColumns = True
        .WebConsecutiveDelimitersAsOne = True
        .WebSingleBlockTextImport = False
        .WebDisableDateRecognition = False
        .WebDisableRedirections = False
        .Refresh BackgroundQuery:=False
    End With
End Sub
above macro is recoded macro but I tried to change area "WebTables = """SitePH_grdSociety"""with page number but its extracting data only of one page

Thanks in advance