Solved

Display/View WebBrowser Address

Posted on 2006-06-20
7
244 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

763 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