Solved

Retrieving URL from parent browser

Posted on 1999-01-06
4
127 Views
Last Modified: 2013-12-26
I want to have an activex control im working on be able to retrieve the current url from the browser it resides in.
0
Comment
Question by:Montano_Vista
  • 2
4 Comments
 

Expert Comment

by:T38Jet
ID: 1489473
use    Document.Location.Href
0
 

Author Comment

by:Montano_Vista
ID: 1489474
Your answer looks like a line of code, but I’m not sure how to use it.  Is it intended to be put in a vbscript that references an activex document?  If so, do I need to remake my project as an activex document instead of an activex control?  If this is the case; would I use PropBag to access it? I’m sorry if I appear stupid, but activex is new to me...

please give me just a little more info..

0
 
LVL 4

Accepted Solution

by:
chabaud earned 40 total points
ID: 1489475
Here is an example of a control with one label.
When you click the control in IE, the current url is diplayed by the label.

Private Sub UserControl_Click()
    on error resume next
    Label1.Caption = Parent.Script.document.Location.Href
    on error goto 0
End Sub

0
 

Author Comment

by:Montano_Vista
ID: 1489476
Thank you, I haven't tried it but it looks like what I need.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Share codes 68 114
VB6 convert MSHFlexgrid1 cells 7 52
VBA filters 2 37
VB6 - Compare and highlight cell not the same 3 33
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

708 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

17 Experts available now in Live!

Get 1:1 Help Now