VBA to Open Dynamic URL Hyperlink

gmooney

Active Member
Joined
Oct 21, 2004
Messages
254
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

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
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 …​
 
Upvote 0

Forum statistics

Threads
1,224,815
Messages
6,181,136
Members
453,021
Latest member
Justyna P

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