+ Reply to Thread
Results 1 to 8 of 8

I need help to retrieve the text in the IE address bar to a excel cell using VBA

Hybrid View

  1. #1
    Registered User
    Join Date
    01-08-2014
    Location
    Mexico
    MS-Off Ver
    Excel 2010
    Posts
    5

    I need help to retrieve the text in the IE address bar to a excel cell using VBA

    Hi everyone, I'm looking over the internet to find some way to get the URL from certain Internet Explorer window (I need to have several IE windows open at the same time).

    I see the post Geting URLs from internet explorer and I try to modify just to get the text from the address bar in IE but I can't.

    Looks like some easy for everyone, but is not for me.

    I have lots of IE windows but I need just the text dropped in a certain cell into a excel worksheet, the address bar looks like "http://xxxxxx.xxxxxx.com/xxxxxx/xxxxr/xxxxxxxx/image.asp?SetID=050525807877" without quotes, and I need just the last 12 digits, the page changes as soon I hit the "Process" button and gave me another image with a different number but the sintax is the same just change the last 12 digits.

    I don't know if someone can to help me, but if you can it will be really appreciated.

    Thanks in advance and best regards.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: I need help to retrieve the text in the IE address bar to a excel cell using VBA

    Hello robles74,

    Bienvenido al foro!

    Para ayudar a usted, por favor envíe su código y cargar su libro.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    01-08-2014
    Location
    Mexico
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: I need help to retrieve the text in the IE address bar to a excel cell using VBA

    Hi again I forgot to send the archive.
    Attached Images Attached Images
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    01-08-2014
    Location
    Mexico
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: I need help to retrieve the text in the IE address bar to a excel cell using VBA

    Hi Leith, due a some restrictions I can't send you the "real" file, but I make a test one.

    The idea is "simple" (yea sure :-)) I have several internet explorer windows open at the same time, then I need to extract the address from certain page and paste them in a excel cell.

    As you can see the task looks easy for everyone but not for me, I'm not a programmer but I build some macros to do more fast and efficient my work but right now I'm "stuck" dealing with this.

    The task is to "get", "retrieve" or "copy" the URL from the address bar, as you can see the address is the same every time just changes at the end, I need to extract with a macro the last 12 digits (in the example the last 2 digits), and then copy the result in a specific cell in the excel workbook.

    I don't have deep (read practically any) knowledge in VBA and this is the reason of my request. I hope you can review the file and help me.

    I'll really appreciate any help from you or any one in the community.

    Thanks and best regards.
    excelforumimage.JPG

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: I need help to retrieve the text in the IE address bar to a excel cell using VBA

    Hello Robles74,

    This macro will list the URL for tab open in Internet Explorer starting at cell "A2" on "Sheet2". You can change the sheet and cell to where you want the output.

    Sub ListURLs()
    
        Dim n       As Variant
        Dim oShell  As Object
        Dim Rng     As Range
        Dim Wks     As Worksheet
        
            Set Wks = Worksheets("Sheet2")
            
            Set Rng = Wks.Range("A2")
            
            Set oShell = CreateObject("Shell.Application")
                
            For n = 0 To oShell.Windows.Count - 1
                If oShell.Windows(n).Name = "Internet Explorer" Then
                    Rng.Offset(n, 0).Value = oShell.Windows(n).LocationURL
                End If
            Next n
                        
    End Sub

  6. #6
    Registered User
    Join Date
    01-08-2014
    Location
    Mexico
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: I need help to retrieve the text in the IE address bar to a excel cell using VBA

    Hello Leith.

    I try with the code but nothing happens, by the way I already have the "Microsoft Internet Controls" reference "checked", because how I say previously I read some threads about how to get the URL's and in everyone ask for this reference active, I don't know if this matter right now.

    Thank you very much, I really appreciate your help.

  7. #7
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: I need help to retrieve the text in the IE address bar to a excel cell using VBA

    Hello Robles74,

    Tal vez yo no entendía su ejemplo. ¿Quieres mostrar una página web de una dirección URL?

  8. #8
    Registered User
    Join Date
    01-08-2014
    Location
    Mexico
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: I need help to retrieve the text in the IE address bar to a excel cell using VBA

    Hi Leith, I'm unable to send you the web page, but we are freeze to do/apply this idea due a some restriction with the "mainframe" owner. By this reason I can't to continue with this task.

    The idea to pull the text from the address bar in the internet explorer window should be cancelled by now.

    I really appreciate your help and now I need your help to "close" this thread.

    Again thank you very much and best regards.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 10-24-2014, 04:58 PM
  2. Replies: 4
    Last Post: 07-11-2012, 04:00 PM
  3. Convert text address to cell reference address
    By shaod in forum Excel General
    Replies: 1
    Last Post: 12-23-2011, 01:37 AM
  4. Help - retrieve cell address
    By ppbedz in forum Excel General
    Replies: 5
    Last Post: 04-17-2006, 05:50 PM
  5. How can VBA retrieve user's IP Address
    By KSMorris@comcast.net in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-15-2005, 04:05 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1