VBA to Open Dynamic URL Hyperlink

gmooney

Board Regular
Joined
Oct 21, 2004
Messages
242
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have posted a couple of requests on some forums with great suggestions, but nothing has quite worked.

My scenario:

I have a couple combo box dropdowns that will update a cell A1 (Range Name of URL) with a HYPERLINK formula (=HYPERLINK(XLOOKUP(A2,'Report Links'!$AJ:$AJ,'Report Links'!$AD:$AD),"URLSTORY") returning a hyperlink from the "Report Links" sheet. The cell A1 is in Sheet1.

My current Macro (on a Button on "Report Links" sheet:

Sub Macro1()
Application.ScreenUpdating = False
Worksheets("Sheet1").Activate
Range("URL").Hyperlink.Follow
Application.ScreenUpdating = True
End Sub


This gives me an error of Runtime error 438, "Object Doesn't Support this property or method." on the Range("URL").Hyperlink.Follow line.

Any ideas how I can overcome this?
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Marc L

Well-known Member
Joined
Apr 5, 2021
Messages
1,725
Office Version
  1. 2010
Platform
  1. Windows
Hi,​
as a 'hyperlink formula' is nothing else but a formula so very not a hyperlink object​
as you can check out within your code with the Count property of the Hyperlinks collection …​
 

Forum statistics

Threads
1,147,748
Messages
5,742,971
Members
423,769
Latest member
LongToast

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
Top