Solved

Retrieving URL from parent browser

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

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
VB6 Compile Compatibility Issue 4 115
RUNRMTCMD from AS/400 12 69
Send outlook email from VBS Script 2 45
how to loop through and process two columns in excel 8 25
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
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…

830 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