Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WebBrowsers new url address

Status
Not open for further replies.

MikeCt

Programmer
Nov 6, 2001
44
US
I'm using VB6 and I have a form with a WebBrowser control and a command button

Private Sub Form_Load()
WebBrowser1.navigate "End Sub

Starting from google.com webpage, I begin my search
Once I find the website needed I would like to save the url of this new page

Private Sub Command1_Click()
Dim strSavedSite As String
strSavedSite = WebBrowser1.LocationURL
End Sub

The variable strSavedSite is saved with the original url " "
How can I retreive the url of the new found website? ( Like the Save to Favorites button )

Thanks for the help
 
Your code must work just fine.
strSavedSite = WebBrowser1.LocationURL gives the current webpage url. At least in my test program. Don't understand why yours does not.
 
As JackTheC says, it should be working.

Can you perhaps give us an example where it does not work?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top