Results 1 to 5 of 5

Thread: Does anyone know...

  1. #1
    Guest
    Does anyone know how to get the current URL that Internet Explorer is at into a VB program? I want to be able at any time have the URL transfered to my program.

    I have looked everywhere, please help..

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    Try this:
    Start a new standard EXE project and add a CommandButton to the default form.
    Click on Project|References and check the Microsoft Internet Controls checkbox.
    Then add the following code:
    Code:
    Private ie As InternetExplorer
    
    Private Sub Form_Load()
        'start IE
        Set ie = New 
        ie.Visible = True
        ie.GoHome
    End Sub
    
    Private Sub Command1_Click()
        MsgBox ie.LocationURL
    End Sub
    When you run this project a new Internet Explorer window is opened. When you click the CommandButton a MsgBox is popped up showing the location.

    Good luck!

  3. #3
    Guest
    NEED MORE>>>

    I used what you said Joacim, but all that it does is start IE and gives me the address at start up. What I need is at any given time, I be able to get the address from IE, not just at one instance.

    Please continue responses, need help!!
    Someone has got to know...

  4. #4
    Guest
    I will add more to help clarify...

    I am designing a program so when I am surfing the web and I am at a web site that I want to get links from, and store in a file, I just push a button and the program will get the address from IE and then go off on its own and get the HTML, parse out the links and store them in a list box.

    This is why I need the current IE's address.

  5. #5
    Fanatic Member gwdash's Avatar
    Join Date
    Aug 2000
    Location
    Minnesota
    Posts
    666
    http://forums.vb-world.net/showthrea...threadid=25452

    I posted this a little while ago, it should help you do what you want


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width