Hi fox thanks for the reply when you can be home im at office till 8:30 IST so if you get me some code to click on the tabel urls and to change combobox value
in ie i checked from my end i am sucessuful to get the details of the buttons via inertext but not able to select value or change the selected index
Just wanna let u know that its an url which i want a click to be send. i have done so far please help.
Code:Public Sub ie_interface() Dim ie As Object Set ie = CreateObject("InternetExplorer.Application") ie.navigate Sheet1.URL_text.Text Sheet1.Pro_text1.Visible = True Sheet1.Pro_text2.Visible = True Application.ScreenUpdating = True cnt2 = Sheet1.Pro_text1.Width Do While ie.Busy If cnt < cnt2 Then Sheet1.Pro_text2.Width = cnt cnt = cnt + 2 Application.Wait Now() + TimeValue("00:00:02") End If Loop Sheet1.Pro_text2.Width = cnt2 Application.Wait Now() + TimeValue("00:00:02") Sheet1.Pro_text2.Width = 0 cnt = 0 cnt2 = 0 Sheet1.Pro_text1.Visible = False Sheet1.Pro_text2.Visible = False ie.Visible = True Application.Wait Now() + TimeValue("00:00:02") ie.document.Login.UserName.Value = Sheet1.User_text.Text ie.document.Login.UserPassword.Value = Sheet1.Pass_text.Text ie.document.getElementById("Submit").Click Do While ie.Busy Loop Application.Wait Now() + TimeValue("00:00:01") Application.SendKeys ("%{ }X") Application.Wait Now() + TimeValue("00:00:01") ie.document.forms(0).all("m8").Click Application.Wait Now() + TimeValue("00:00:02") Application.SendKeys ("{TAB 3}") Application.Wait Now() + TimeValue("00:00:02") Application.SendKeys ("{TAB 4}~") Application.Wait Now() + TimeValue("00:00:02") Dim myHTMLDoc As HTMLDocument Set myHTMLDoc = ie.document 'set myHTMLFrame2 as the 2nd frame of the main page (index starts at 0) Dim myHTMLFrame2 As HTMLDocument Set myHTMLFrame2 = myHTMLDoc.frames(0).document 'set myHTMLFrame2_3 as the 3rd frame of myHTMLFrame2 Dim myHTMLFrame2_3 As HTMLDocument ' Set myHTMLFrame2_3 = myHTMLFrame2.frames(1).document 'get all the tables in myHTMLFrame2_3 Dim allTables As Object Set allTables = myHTMLFrame2.getElementsByTagName("Table") 'set myTable as the 3rd table in allTables Dim myTable As HTMLTable Set myTable = allTables(7) For Row = 1 To myTable.Rows.Length For Col = 1 To myTable.Rows(Row - 1).Cells.Length If myTable.Rows(Row - 1).Cells(Col - 1).innerText = "Data Extraction" Then myTable.Rows(Row - 1).Cells(Col - 1).Click End If Next Col Next Row ie.Visible = True End Sub





Reply With Quote
Bookmarks