Yorkiemuncher
New member
- Local time
- Today, 23:44
- Joined
- Mar 2, 2011
- Messages
- 6
I am trying to use google search engine by inserting a search term directly into Google input control. I am using Access 2010 and IE9.
Private webiewindow As New SHDocVw.InternetExplorer
Sub google_search(ByVal strsearchterm As String)
With webiewindow
.Navigate (google web page)
.Document.getElementById("gbqfq").Value = strsearchterm
.Visible = True
.Height = 768
.Width = 1024
.Top = 0
.Left = 156
End With
End Sub
The problem i am having is the line in red. When executed during run time it throws a runtime error -2147467259 (80004005) Automation Error and Unspecified Error.
The above code will execute normally in debugging mode so i am at a loss to why this is. It would be greatly appreciated for a fast solution.
Cheers
Private webiewindow As New SHDocVw.InternetExplorer
Sub google_search(ByVal strsearchterm As String)
With webiewindow
.Navigate (google web page)
.Document.getElementById("gbqfq").Value = strsearchterm
.Visible = True
.Height = 768
.Width = 1024
.Top = 0
.Left = 156
End With
End Sub
The problem i am having is the line in red. When executed during run time it throws a runtime error -2147467259 (80004005) Automation Error and Unspecified Error.
The above code will execute normally in debugging mode so i am at a loss to why this is. It would be greatly appreciated for a fast solution.
Cheers