+ Reply to Thread
Results 1 to 3 of 3

VBA code to copy all URL addresses from a web page

  1. #1
    Forum Contributor
    Join Date
    06-07-2014
    Posts
    213

    VBA code to copy all URL addresses from a web page

    Hello, please see the attached file. On Sheet1, if you click the 'Open Userform' button, you will get a userform [duh - lol]. I want to be able to enter a URL [e.g. https://www....etc.] and then click the 'Copy all URLs...' button and have each and every link/embedded link found on that webpage listed in column A of Sheet1 in the attached file.

    Your assistance to write the code for the command button will be appreciated!
    Attached Files Attached Files
    Last edited by chin67326; 10-29-2021 at 10:54 PM.
    If you have received help from a user, please feel free to Rep that person.
    Also, do remember to click Thread Tools and mark your thread as solved, if you have achieved a solution to your thread.

  2. #2
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    2,026

    Re: VBA code to copy all URL addresses from a web page

    Perhaps using HTTP request?

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    06-07-2014
    Posts
    213

    Re: VBA code to copy all URL addresses from a web page

    Thanks ByteMarks! It works well on some webpages but on some pages I get no data back but instead get the below error:

    The system cannot locate the resource specified

    The links I am trying to obtain from the webpages don't necessarily start with the usual https:// and some are just sentences or words on the page that have a hyperlink and when you click on the words or sentences they send the user to that page.

+ 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. Simple VBA to copy full page from a website page and paste back into excel page
    By popper08 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-22-2021, 12:38 PM
  2. [help with code] need to update existing code to copy and keep rows on input page
    By scott micklo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-25-2016, 01:36 PM
  3. Trying to find & copy text string from page source code
    By LightingPop in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-16-2015, 09:24 PM
  4. Copy web page with VBA code- broken
    By flaviu123 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-22-2014, 09:45 AM
  5. [SOLVED] Vba code to start page numbers from current page (bottom of the pate right side)
    By satputenandkumar0 in forum Word Formatting & General
    Replies: 2
    Last Post: 04-04-2014, 01:09 AM
  6. [SOLVED] I need this code to copy one more page.
    By TomRet in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-26-2014, 11:15 PM
  7. copy from... to Sheet1 code page
    By Jessebraswell in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-21-2009, 12:11 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