Pagina web a excel

Hola necesito bajar varias paginas de un sitio a Excel 2007. Hasta ahora lo vengo haciendo manual pero tengo como 1000 codigos diferentes. El problema que tengo es que estoy buscando una forma poder cambiar "MAA001" o "MKM100" automaticamente. Tengo los codigos en una lista en excel. Pero en realidad seria mejor si me baja todos cualquiera sea el codigo que encuentre.
With ActiveSheet.QueryTables.Add(Connection:= _
        "URL;http://www.moneycontrol.com/india/mutualfunds/mfinfo/portfolio_holdings/MAA001" _
        , Destination:=Range("$A$1"))
        .WebSelectionType = xlEntirePage
        .WebFormatting = xlWebFormattingNone
        .Refresh BackgroundQuery:=False
    End With
With ActiveSheet.QueryTables.Add(Connection:= _
        "URL;http://www.moneycontrol.com/india/mutualfunds/mfinfo/portfolio_holdings/MKM100" _
        , Destination:=Range("$A$126"))
        .WebSelectionType = xlEntirePage
        .WebFormatting = xlWebFormattingNone
        .Refresh BackgroundQuery:=False
    End With
With ActiveSheet.QueryTables.Add(Connection:= _
        "URL;http://www.moneycontrol.com/india/mutualfunds/mfinfo/portfolio_holdings/MAA003" _
        , Destination:=Range("$A$251"))
        .WebSelectionType = xlEntirePage
        .WebFormatting = xlWebFormattingNone
        .Refresh BackgroundQuery:=False
    End With

Añade tu respuesta

Haz clic para o