+ Reply to Thread
Results 1 to 4 of 4

Hyperlink to Web Excel File

  1. #1
    Registered User
    Join Date
    12-15-2007
    Posts
    2

    Hyperlink to Web Excel File

    I created a hyperlink using the concatenate function, depending on the link name determines the time frame for the data I want to open.

    Is there a way to program a macro to open a hyperlink that changes. For example one day the hyperlink may be http://data2006.xls and the next time I may want it to be http://data1999.xls

  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,258
    Hello ajs3349,

    Welcome to the Forum! You can place the URL in another cell on the worksheet and concatenate its value with the remaining string.

    Example
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross
    Last edited by Leith Ross; 12-16-2007 at 04:30 AM.

  3. #3
    Registered User
    Join Date
    12-15-2007
    Posts
    2
    the problem I'm running in to is that when I run a macro it records the specific hyperlink address

    Please Login or Register  to view this content.
    I need that Workbook.Open Filename to = a cell where I can change the values. For instance you see QQQQ in the above code, I want the path to change if I delete QQQQ from cell A1 and place IBM there instead because right now every time I run the macro it will bring back the same data every time regardless of what the actual hyperlink in the cell is since the link is in the code.

    Thanks for the help

  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,258
    Hello ajs349,

    Using a hyperlink in this fashion in VBA is a convoluted. Here is a macro that will allow you to construct a web address string and launch the browser automatically to open it.
    Please Login or Register  to view this content.
    Example
    Cell A1 points to the specific file on the web site.
    Cell A2 concatenates the web address.
    Please Login or Register  to view this content.
    To Install the Macro:
    1. Copy the Macro code above using CTRL+C
    2. Open Excel and Right Click on any Sheet Tab
    3. Click on View Code in the pop up menu
    4. Use ALT+I to activate the VBE Insert Menu
    5. Press the letter m to insert a Standard Module
    6. Paste the macro code using CTRL+V
    7. Save the macro using CTRL+S
    8. Close the VBE and return to excel using ALT+Q

    Sincerely,
    Leith Ross

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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