Solved

Retrieving URL from parent browser

Posted on 1999-01-06
4
130 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Access 2003, my txt file export is running backwards 4 47
TT Auto Dashboard 13 85
Macro Excel - Multiple If conditions 2 65
Child Form in front 4 39
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

896 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