+ Reply to Thread
Results 1 to 7 of 7

Help with .Open "GET" code

  1. #1
    Registered User
    Join Date
    02-22-2011
    Location
    Chester
    MS-Off Ver
    Excel 2007
    Posts
    46

    Help with .Open "GET" code

    Hi,

    I want to use macro to open a website which is stored as hyperlink in my sheet e.g. in A1. I have been using a macro, which had a direct link in its code, but now
    want the macro to take the link that is in a given cell e.g. from A4.

    What do I need to put after the "GET", before False at the end?

    Please Login or Register  to view this content.
    Thank you

  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: Help with .Open "GET" code

    Hello jakg88,

    You need to supply the URL as a string. Be sure it is fully qualified with the proper protocol string: http://, ftp://, etc. This won't be a problem when retrieving the URL from a hyperlink.

    This macro will retrieve a hyperlink either from a formula, VBA, or manually added hyperlink. Add a new module to your workbook and paste the macro into.

    Get URL from Hyperlink Formula or Range object
    Please Login or Register  to view this content.
    Using the macro in Your Code
    Please Login or Register  to view this content.
    Last edited by Leith Ross; 02-22-2014 at 07:04 PM.
    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
    02-22-2011
    Location
    Chester
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: Help with .Open "GET" code

    Hi,

    Thank you so much for your help.

    I pasted the function and modified my code, but it seems like it doesn't like this part:

    Please Login or Register  to view this content.
    as it returns error.

    Any idea where I went wrong?

    Thank you

  4. #4
    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: Help with .Open "GET" code

    Hello jakg88,

    Can you post a copy of the workbook for me to review?

  5. #5
    Registered User
    Join Date
    02-22-2011
    Location
    Chester
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: Help with .Open "GET" code

    Managed to get it work. Thank you very much for all your help!

  6. #6
    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: Help with .Open "GET" code

    Hello jakg88,

    What was the fix?

  7. #7
    Registered User
    Join Date
    02-22-2011
    Location
    Chester
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: Help with .Open "GET" code

    Your code was all spot on. Was just me doing some typo. Tried it again in a new file and worked brilliantly. Thank you again

+ 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: 1
    Last Post: 05-23-2013, 02:04 PM
  2. Open files from FTP server (works with "servername" but doesn't work with "ip address")
    By adammsu1983 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-24-2012, 04:30 PM
  3. need VBA code to open a file type then do a "=countA(A:A)-1" and close it
    By BrandonFromSingapore in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-26-2012, 12:19 PM
  4. reference the file set by the VBA code "Set wb = Workbooks.Open(sWb)"
    By ggremel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-26-2011, 11:49 PM
  5. [SOLVED] Loop through ".DAT" files, open run code, close next
    By Les Stout in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-20-2006, 05:20 AM

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