Retrieving URL from parent browser

I want to have an activex control im working on be able to retrieve the current url from the browser it resides in.
Montano_VistaAsked:
Who is Participating?
 
chabaudCommented:
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
 
T38JetCommented:
use    Document.Location.Href
0
 
Montano_VistaAuthor Commented:
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
 
Montano_VistaAuthor Commented:
Thank you, I haven't tried it but it looks like what I need.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.