Solved

Display/View WebBrowser Address

Posted on 2006-06-20
7
237 Views
Last Modified: 2010-04-30
I have a WebBrowser Xcontrol on a MS Access 2003 Form.  I have a text box where I want to display the web address of the current displayed webpage of this WebBrowser.  Since the webpage has multiple links, I want the text box to display the current webaddress everytime the page changes.  Esentially I want to display the AddressBar.  In the properties I have the "AddressBar" set to YES but it doesn't display the address bar.

Please let me know if you have any questions or need more detail.

Thank you in advance,

Walfe31
0
Comment
Question by:walfe31
7 Comments
 
LVL 9

Expert Comment

by:justchat_1
ID: 16947496
on the navigate2 event set the textbox to the url property
0
 
LVL 8

Expert Comment

by:hiteshgupta1
ID: 16948614
Try either this

Private Sub WebBrowser1_NavigateComplete2(ByVal pDisp As Object, URL As Variant)
Form1.Caption = WebBrowser1.LocationName
End Sub

or this

Private Sub WebBrowser1_NavigateComplete2(ByVal pDisp As Object, URL As Variant)
Form1.Caption = WebBrowser1.LocationURL
End Sub


0
 
LVL 8

Accepted Solution

by:
hiteshgupta1 earned 125 total points
ID: 16949219
sorry
u want to display it in textbox
so

 text1.text=WebBrowser1.LocationName
or
 text1.text=WebBrowser1.LocationURL
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 8

Expert Comment

by:kaliyugkaarjun
ID: 16949518
Private Sub WebBrowser1_DownloadComplete()
On Error Resume Next
Me.Caption = WebBrowser1.LocationName
Text1.Text = WebBrowser1.LocationURL
End Sub

0
 
LVL 9

Expert Comment

by:justchat_1
ID: 16954208
hiteshgupta1 thats the code for what I was talking about...thanks

kaliyugkaarjun - you want to see where the browser is going before the page is fully loaded
0
 

Author Comment

by:walfe31
ID: 16954693
This is what I was looking for: text1.text=WebBrowser1.LocationURL

Thanks for you help.
0
 
LVL 9

Expert Comment

by:justchat_1
ID: 16955325
in the navigate2 event? cause that would be a point split
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now