MartyConnelly
martyconnelly at shaw.ca
Fri Jan 13 12:53:56 CST 2006
Assuming your webbrowser control is called ocxWeb.
I haven't tested this within frames.
on a command button
Private Sub Command23_Click()
Debug.Print Me!ocxWeb.LocationURL
Debug.Print Me!ocxWeb.LocationName
End Sub
It is written up in Getz's ADH book chapter 23
There is an undocumented event method
see shdocvw.dll set a reference and view in object browser
Private Sub ocxWeb_BeforeNavigate(ByVal URL As String, ByVal Flags As
Long, _
ByVal TargetFrameName As String, PostData As Variant, ByVal Headers As
String, Cancel As Boolean)
Me!lblStatusNav.Caption = "Navigating to " & URL & "..."
Me!txtSearch = URL
End Sub
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/office97/html/usingwebbrowsercontrol.asp
http://www.vbwm.com/art_2001/IE05/
http://support.microsoft.com/default.aspx?scid=kb;en-us;165212
Darren DICK wrote:
>Hi Drew
>
>Long time no speak :-))
>
>I Agree...there should be a navigate event but how would I interrogate it and
>get its results?
>
>DD
>
>-----Original Message-----
>
>From: accessd-bounces at databaseadvisors.com [
><mailto:accessd-bounces at databaseadvisors.com>
>mailto:accessd-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
>
>Sent: Saturday, 14 January 2006 4:03 AM
>
>To: accessd at databaseadvisors.com
>
>Subject: Re: [AccessD] A2003:Navigating using Web Browser Control
>
>There should be a navigate event, that should have the new URL as an argument.
>
>Drew
>
>-----Original Message-----
>
>From: Darren DICK [ <mailto:darrend at nimble.com.au> mailto:darrend at nimble.com.au]
>
>Sent: Friday, January 13, 2006 10:44 AM
>
>To: AccessD
>
>Subject: [AccessD] A2003:Navigating using Web Browser Control
>
>Hi all
>
>Using the Microsoft Web Browser from the ActiveX list Dropped it onto a form -
>all good I can go to a page by using code such as...
>
>Me.actxWebBrowser.navigate <outbind://3/www.databaseadvisors.com>
>www.databaseadvisors.com No problem
>
>When I click a link inside the 'loaded' web page - how am I to detremine this
>'new address'?
>
>I have tried various things like...
>
>me.actxWebBrowser.navigate.value
>
>etc with no success
>
>Any suggestions?
>
>Many thanks in advanmce
>
>Darren
>
>FYI
>
>OLE CLASS =Microsoft Web Browser
>
>CLASS = Shell.Explorer.2
>
>
>
--
Marty Connelly
Victoria, B.C.
Canada