can you help me with my code involving IE and VBA

wesley14

Board Regular
Joined
Dec 8, 2011
Messages
74
Code:
Dim HTMLDoc As HTMLDocument
Dim oBrowser As InternetExplorer
Sub Website_Login_Test()
Application.ScreenUpdating = False
Dim oHTML_Element As IHTMLElement
Dim sURL As String
Dim evt As Object
On Error GoTo Err_Clear
sURL = "[URL="http://www. this is where my"]wwww. this is where my [/URL]page is.jsp"
Set oBrowser = New InternetExplorer
oBrowser.Silent = True
oBrowser.timeout = 60
oBrowser.Navigate sURL
oBrowser.Visible = True
Do
' Wait till the Browser is loaded
Loop Until oBrowser.ReadyState = readystate_complete
Set HTMLDoc = oBrowser.Document
'HTMLDoc.all.q.Value = "search text"
'HTMLDoc.all.Password.Value = "examplepassword&quot"
 
 
 
Call loopFiles
Call changeFilter
Call clickStart
Call noofMessages
 
Call loopFiles
Call changeFilter2
Call clickStart
Call noofMessages2

Call changeFilter3
Call clickStart

Call noofMessages3
 

Call changeFilter4
Call clickStart
Call noofMessages4
well after the first 4 call it does not wait until the browser is finished to run the next one.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Forum statistics

Threads
1,216,075
Messages
6,128,668
Members
449,463
Latest member
Jojomen56

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top