Solved

How to find URL from WebBrowser object ?

Posted on 2000-03-06
3
147 Views
Last Modified: 2012-06-27
I open an HTML page via WebBrowser.Navigate command. Next I navigate into Web clicking directly on WebBrowser windows . Finally I need to read latest URL address from WebBrowser object. Is this possible to do?
Thanks in advance. Raoul
0
Comment
Question by:raoulg
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
mcrider earned 50 total points
Comment Utility
You can get the URL you clicked on in the BeforeNavigate2 Event of the WebBrowser control... Like this:

Private Sub WebBrowser1_BeforeNavigate2(ByVal pDisp As Object, URL As Variant, Flags As Variant, TargetFrameName As Variant, PostData As Variant, Headers As Variant, Cancel As Boolean)
    Debug.Print URL
End Sub


Cheers!®©

0
 

Author Comment

by:raoulg
Comment Utility
All right, thanks.
0
 
LVL 14

Expert Comment

by:mcrider
Comment Utility
Curious... Why grade this a "B"??
0

Featured Post

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

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…

772 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

13 Experts available now in Live!

Get 1:1 Help Now