VBA to run Hyperlinks

DownUnderFar

New Member
Joined
Jul 4, 2022
Messages
16
Office Version
  1. 365
Platform
  1. MacOS
Hi All:

I have a workbook with the sheets "Buttons," "Weekdays," and "Weekends."

The sheets "Weekdays" and "Weekends" has hyperlinks in Column G.
The sheet "Buttons" has two buttons, named "Weekdays" and "Weekends."

I'm looking for a code that when I click the button "Weekdays," it will run all of the hyperlinks in sheet "Weekdays".
Same for the weekends.

Note - there are no other hyperlinks on either sheet than those that I want to run, so a macro that runs all hyperlinks on a sheet will work. There is, however, other data on the sheets.

Also, I'm unable to upload a mini-sheet at the moment. I'll try to upload one later tonight if anyone needs one.
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
You can do something like this.

VBA Code:
Sub test()
    Dim URL As String
    URL = "https:\\www.google.com"
    
    
    ActiveWorkbook.FollowHyperlink _
    Address:=URL, _
    NewWindow:=True, _
    AddHistory:=True
    
    
End Sub
 
Upvote 0
OK, so how do I reference the links on on Sheet "Weekdays" in column G into this?
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,954
Members
449,095
Latest member
nmaske

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top