Hello Friends ,
I need your help with two issues that am facing.
Am trying to copy information from a webpage http://delhichamber.co.in/ListingDetails.asp?MemID=1772
It is a directory.Containing links to every member it has. The info on each page is divided in 3 parts. Name , Business Type , Contact Information.
http://i54.tinypic.com/2j9tm8.jpg
You can see the image on above link to understand what am trying to do.
Now my question is , is it possible to have info collected in specified cells the way I am wanting to do.
And my second question is the macro that am using to fetch information is putting information horizontally in excel.
Here is the macro.
Sub LoopThrough()
Dim WSO As Worksheet
Set WSO = ActiveSheet
For Each Cell In WSO.Range("A1:A5")
ThisURL = "URL;" & Cell.Value
With ActiveSheet.QueryTables.Add(Connection:= _
ThisURL, Destination:= _
Range("$A$23"))
.Name = "ListingDetails.asp?MemID=2302"
.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 = "19,""FormPaddingL"",""FormPaddingL"""
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
ActiveWindow.SmallScroll Down:=-2
Next Cell
End Sub
Sub Getlinks()
For Each h1 In ActiveSheet.Hyperlinks
Cells(hl.Parent.Row, 2).Value = hl.Address
Next hl
End Sub
I am complete noob at programming. So would highly appreciate if anyone here could help me with this.Thanks to all in advance.
I need your help with two issues that am facing.
Am trying to copy information from a webpage http://delhichamber.co.in/ListingDetails.asp?MemID=1772
It is a directory.Containing links to every member it has. The info on each page is divided in 3 parts. Name , Business Type , Contact Information.
http://i54.tinypic.com/2j9tm8.jpg
You can see the image on above link to understand what am trying to do.
Now my question is , is it possible to have info collected in specified cells the way I am wanting to do.
And my second question is the macro that am using to fetch information is putting information horizontally in excel.
Here is the macro.
Sub LoopThrough()
Dim WSO As Worksheet
Set WSO = ActiveSheet
For Each Cell In WSO.Range("A1:A5")
ThisURL = "URL;" & Cell.Value
With ActiveSheet.QueryTables.Add(Connection:= _
ThisURL, Destination:= _
Range("$A$23"))
.Name = "ListingDetails.asp?MemID=2302"
.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 = "19,""FormPaddingL"",""FormPaddingL"""
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
ActiveWindow.SmallScroll Down:=-2
Next Cell
End Sub
Sub Getlinks()
For Each h1 In ActiveSheet.Hyperlinks
Cells(hl.Parent.Row, 2).Value = hl.Address
Next hl
End Sub
I am complete noob at programming. So would highly appreciate if anyone here could help me with this.Thanks to all in advance.