Can anybody please help me?
In MS Access, I'm trying to open IE, navigate to Google.com and set my text in the text box.
I don't know why it's not going.
I used:
---
Function OpenIE()
Dim ie As Object
Set ie = CreateObject("internetexplorer.application")
ie.Visible = True
ie.Navigate "http://www.google.com/"
While ie.busy
DoEvents
Wend
ie.Document.getElementById("q").Value = "My Search Text"
End Function
---
The webpage is opening but the text is not being entered. An I got an error message
Using Windows 7 - IE9 - Office 2010
I got following error:
---
Run-time error '424':
Object required
---
Using Windows Vista SP2 - IE8 - Office 2007
I got following error:
---
Run-time error '-2147467259 (80004005)':
Method 'Document' of object 'IWebBrowser2' failed
---
The error is for the last line:
" ie.Document.getElementById("q").Value = "My Search Text" "
In MS Access, I'm trying to open IE, navigate to Google.com and set my text in the text box.
I don't know why it's not going.
I used:
---
Function OpenIE()
Dim ie As Object
Set ie = CreateObject("internetexplorer.application")
ie.Visible = True
ie.Navigate "http://www.google.com/"
While ie.busy
DoEvents
Wend
ie.Document.getElementById("q").Value = "My Search Text"
End Function
---
The webpage is opening but the text is not being entered. An I got an error message
Using Windows 7 - IE9 - Office 2010
I got following error:
---
Run-time error '424':
Object required
---
Using Windows Vista SP2 - IE8 - Office 2007
I got following error:
---
Run-time error '-2147467259 (80004005)':
Method 'Document' of object 'IWebBrowser2' failed
---
The error is for the last line:
" ie.Document.getElementById("q").Value = "My Search Text" "