Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9230715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:53:29+00:00 2026-06-18T05:53:29+00:00

I have an Excel File with approx 1200 URL’s. I have a macro that

  • 0

I have an Excel File with approx 1200 URL’s.

I have a macro that will open these URL’s in single shot , but I realize that this will make system slow and probably might not be possible too.

So I thought to make some changes in script to open URL’s only in selected cells ( lets say 20) , for e.g. if I select Cell A1:A20 and run macro , it should open them in my default browser , once I am done with my operation , I will select next 20 and run macro again.

Here is my Macro, kindly let me know how I can I change to to work only on selected cells

Sub Open_Hyperlinks()
    Dim i, LastRow
    LastRow = Range("A" & Rows.Count).End(xlUp).Row
    For i = 1 To LastRow
        If Cells(i, "A").Hyperlinks.Count > 0 Then
            Cells(i, "A").Hyperlinks(1).Follow
        End If
    Next
End Sub

Help is highly appreciated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T05:53:30+00:00Added an answer on June 18, 2026 at 5:53 am

    If your cells are already entered as hyperlinks use this:

    Sub Open_SelectedHyperlinks()
        Dim c As Range
        If Not TypeOf Selection Is Range Then Exit Sub
        For Each c In Selection.Cells
            If c.Hyperlinks.Count > 0 Then _
                c.Hyperlinks(1).Follow
        Next
    End Sub
    

    Else, this will follow all cells, even if they are not entered as hyperlinks:

    Sub Open_SelectedTextlinks()
        Dim c As Range
    
        If Not TypeOf Selection Is Range Then Exit Sub
        For Each c In Selection.Cells
            If c.Hyperlinks.Count = 0 Then
                ActiveSheet.Hyperlinks.Add Anchor:=c, _
                    Address:="http://" & c.Value 'Depending on the content of your cell, remove the "http://" & part
            End If
            c.Hyperlinks(1).Follow
        Next
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an excel file that i need to open and search it. This
I have an Excel file with a Macro that connects to an Oracle Database,
I have an Excel file that has a bunch of VBA and macro code
I have an excel file, validating one column to enter numbers only but it
I have an excel file that I need to make some changes. I need
I have an Excel file that I need to import into a (new) Oracle
I have an excel file that I want to embed in my C# assembly.
I have an Excel file that gets external data from database table. I need
I have a Excel File, i am able to read single row from Excel
I have a an excel file that has been manually populated, and now needs

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.