their is search tool web site (.aspx), which will give the list of data in a table format (Rows & Columns) upon clicking submit button. i want to fetch the second column data from the table and have to save that in a excel. I have already wrote the code for opening the web site and clicking submit botton. I have attached the source code of the web site in this thread. Can anyone give me the sample code to fetch the second colume in the 12th table of the web site.
I have to add the sample code which you are going to provide in below code,
Code
Sub Button1_Click()
Dim obj As Object
Dim Scrn As String
Dim objIE As SHDocVw.InternetExplorer 'microsoft internet controls (shdocvw.dll)
Dim htmlDoc As MSHTML.HTMLDocument 'Microsoft HTML Object Library
Dim htmlInput As MSHTML.HTMLInputElement
Dim htmlColl As MSHTML.IHTMLElementCollection
Set objIE = New SHDocVw.InternetExplorer
If (objIE Is Nothing) Then
MsgBox "Could not create the Internet Explorer object. Stopping macro playback."
Stop
End If
With objIE
.Navigate "http://devts296:81/spiqatools/ui/PolicyFinder.aspx" ' Main page
.Visible = 1
Do While .readyState <> 4: DoEvents: Loop
Application.Wait (Now + TimeValue("0:00:02"))
Set htmlDoc = .document
objIE.document.getElementById("LOBList").Value = "A"
objIE.document.getElementById("DataFilterEnv").Value = "L"
objIE.document.getElementById("ctl04_rdbAutoTransitionSignal_1").Checked = True
objIE.document.getElementById("ctl04_AutoTransitionSignal").Value = "L"
objIE.document.getElementById("btnsubmit").Click
While objIE.Busy
DoEvents
Wend
While objIE.readyState <> 4
DoEvents
Wend
End With
End Sub
Display More