Hi,
The following code gets into our intranet site by logging(till here my code works) in there i need to select the Hyperlink " Industrial Orders" then i need to select "EXT & OGE & Supply then i need to select the list box "Fiscal Week" and need to change the week. Can anyone help me in this please.
Looking forward for ur help..
The code...
Private Sub CommandButton1_Click()
Dim ie As Object
Dim qrySht As Worksheet
On Error GoTo errHandler
Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = True
.Navigate "http://digitalcockpit.indsys.ge.com/digitalcockpit/sso/mycockpit/Home.jsp"
Do Until .ReadyState = 4: DoEvents: Loop
Do While .busy: DoEvents: Loop
Set mytextfield = .document.all.Item("user")
mytextfield.Value = "501159828"
Set mytextfield1 = .document.all.Item("password")
mytextfield1.Value = "LSi@@73vaRII"
ie.document.forms(0).submit
Do Until .ReadyState = 4: DoEvents: Loop
Do While .busy: DoEvents: Loop
'====================================
With .document
For i = 0 To .links.Length - 1
' If InStrB(2, .links(i).innerText, "Home") Then
If InStr(1, .links(i), "Industrial Orders") Then
ie.Navigate .links(i).href
Do While ie.ReadyState <> 4: DoEvents: Loop
Do While ie.busy: DoEvents: Loop
Exit For
End If
Next i
End With
Set doc = ie.document
GetAllTables2 doc
End With
errHandler:
ie.Quit: Set ie = Nothing
End Sub
The following code gets into our intranet site by logging(till here my code works) in there i need to select the Hyperlink " Industrial Orders" then i need to select "EXT & OGE & Supply then i need to select the list box "Fiscal Week" and need to change the week. Can anyone help me in this please.
Looking forward for ur help..
The code...
Private Sub CommandButton1_Click()
Dim ie As Object
Dim qrySht As Worksheet
On Error GoTo errHandler
Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = True
.Navigate "http://digitalcockpit.indsys.ge.com/digitalcockpit/sso/mycockpit/Home.jsp"
Do Until .ReadyState = 4: DoEvents: Loop
Do While .busy: DoEvents: Loop
Set mytextfield = .document.all.Item("user")
mytextfield.Value = "501159828"
Set mytextfield1 = .document.all.Item("password")
mytextfield1.Value = "LSi@@73vaRII"
ie.document.forms(0).submit
Do Until .ReadyState = 4: DoEvents: Loop
Do While .busy: DoEvents: Loop
'====================================
With .document
For i = 0 To .links.Length - 1
' If InStrB(2, .links(i).innerText, "Home") Then
If InStr(1, .links(i), "Industrial Orders") Then
ie.Navigate .links(i).href
Do While ie.ReadyState <> 4: DoEvents: Loop
Do While ie.busy: DoEvents: Loop
Exit For
End If
Next i
End With
Set doc = ie.document
GetAllTables2 doc
End With
errHandler:
ie.Quit: Set ie = Nothing
End Sub