Dear all,
At first, I am a new user in vba. Learning from web and other examples. I am using ms access 2007 in windows 7 32 bit and IE9 and IE10.
Let's go to the subject. I created a form to display the web page with Microsoft web browser control. I used a textbox 'text0' for address bar and a command button 'command2' for on-click event procedure.
I used the code:
Code:
Private Sub Command2_Click()Dim varAdd As String
varAdd = "me.Text0"
If Text0 > 0 Then
Me.WebBrowser4.Navigate "varAdd"
Else
Me.WebBrowser4.Navigate "www.google.com.sa"
End If
End Sub
]
With that code I couldn't open any web page if I type any web address on text0 field. The web page shows "Navigation to the webpage was canceled". But If 'text0' field is empty, it works fine.
I reset Internet Explorer's setting to default but that was also not working.
Any help is appreciated.
Thanks