Solved

How to find URL from WebBrowser object ?

Posted on 2000-03-06
3
151 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
ID: 2587294
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
ID: 2587427
All right, thanks.
0
 
LVL 14

Expert Comment

by:mcrider
ID: 2587602
Curious... Why grade this a "B"??
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Visual Studio 2005 text editor 10 44
Protecting vb6 & .Net code Obfuscation 18 151
MS SQL Update query with connected table data 3 38
Dinamic report to Crosstab query 9 33
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 …
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

856 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