Hi,
I am having strange issue. Hopefully someone expert will help me here.
I am using 32 bit version IE 10
End user is using 64 bit version IE10
For me set iDoc = IE.Document works fine. But for end user I get "Type mismatch error"
Below is my code. Please help.
Function Run() As Integer
Dim IE As InternetExplorer
Dim dataCount%
Set IE = GetIE
Navigate IE, "http://www.workpuddle.com/index.php"
Call Login(IE)
IE.Quit
End Function
Private Sub Login(IE As InternetExplorer)
Dim iDoc As HTMLDocument
Dim uName$, pwd$
Set iDoc = IE.Document
Call GetLoginDetails(jobBoard, uName, pwd)
iDoc.getElementById("login").Value = uName
iDoc.getElementById("pw").Value = pwd
iDoc.getElementsByClassName("sub_btn")(0).Click
Sync IE
End Sub
Sub Sync(IE As InternetExplorer)
Do While IE.Busy Or IE.ReadyState <> READYSTATE_COMPLETE
Application.Wait Now + TimeSerial(0, 0, 1)
Loop
Do While IE.Document.ReadyState <> "complete"
Application.Wait Now + TimeSerial(0, 0, 1)
Loop
'Debug.Print "Out: " & IE.Document.ReadyState
End Sub
Sub Navigate(IE As InternetExplorer, address$)
IE.Navigate address
Sync IE
End Sub
Function GetIE() As InternetExplorer
Set GetIE = New InternetExplorer
With GetIE
.Visible = True
.Height = 550
.Width = 800
.Left = Application.Width - .Width
End With
End Function
Bookmarks