+ Reply to Thread
Results 1 to 2 of 2

VBA CODE - open save hyperlinks

  1. #1
    Registered User
    Join Date
    04-29-2016
    Location
    uk
    MS-Off Ver
    2007
    Posts
    1

    VBA CODE - open save hyperlinks

    Hi ,

    I'm trying to create a VBA code to open , save ( in the same location it is currently saved ) and close a number of files which are all interlinked. This is to help save me time when it comes to refreshing data.

    I want to put all the hyperlinks in Column A , and i have tried recording the following macro and then playing around with it so that it opens any links from A9:A200. I currently might only have 50 files to open , but i want to be able to add additional links in the future if needed.

    The code currently is :

    Sub OSC()
    '
    ' OSC Macro
    ' Open save and close
    '

    '
    Range("A9:A50").Select
    Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
    ActiveWorkbook.Save
    ActiveWindow.Close

    End Sub

    however this only opens and saves the 1st hyperlink.

    Any help here would be greatly appreciated.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166
    Hello bkay25,

    Welcome to Excelforum. Be a part of large Excel community. Enjoy Learning.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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. [SOLVED] Code to open each WB and run code, by range value then save and close the wb
    By bezbid in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-15-2016, 11:05 AM
  2. [SOLVED] Excel slow open/save i think because of hyperlinks??
    By hermarjan in forum Excel General
    Replies: 24
    Last Post: 07-14-2013, 08:36 AM
  3. VBA Code to Open Hyperlinks (in order please!)
    By mdacosta in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-06-2013, 09:49 AM
  4. [SOLVED] Code to Find, Open & Print hyperlinks in a specific column & sheet
    By matrixpom in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-12-2013, 05:37 PM
  5. [SOLVED] VBA code to 'click' Open in the Open or Save dialogue box on a webpage?
    By bensox in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-31-2012, 05:40 AM
  6. Need help with code to save/open
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-28-2006, 08:50 AM
  7. Replies: 0
    Last Post: 05-25-2006, 04:25 PM

Tags for this Thread

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