VLookup to Hyperlink

Claire Jackson

Board Regular
Joined
Jun 30, 2020
Messages
74
Office Version
  1. 2016
Platform
  1. Windows
Hi,

I have a simple code thats stopped working and i have no idea why

Basically a web page is stored in a database so excel looks it up and is meant to take me there but it doesnt.

There are no errors it just seems to do it but doesnt if you know what I mean:

Sub Client_URL()

Dim InitialRange As Range
Dim Job_Ref As Range
Dim Client_URL As String


'Open the data table
Workbooks.Open ("\\PDDC01\ClaimManagement\0-CLAIRE\Daily Report CRM.xlsx")

'Workbook Activate
Workbooks("Test Form with CRM Data.xlsm").Activate

Set InitialRange = Workbooks("Daily Report CRM.xlsx").Worksheets("Table").Range("A1:DE1000")
Set Job_Ref = Workbooks("Test Form with CRM Data.xlsm").Worksheets("Sheet1").Range("$H$1")

Client_URL = Application.WorksheetFunction.VLookup(Job_Ref, InitialRange, 68, False)

'ActiveWorkbook.FollowHyperlink Client_URL
'MsgBox (Client_URL)
'Range("B4").Value = Client_URL

Workbooks("Daily Report CRM.xlsx").Close SaveChanges:=False

End Sub
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Sorry the line 'ActiveWorkbook.FollowHyperlink Client_URL shouldnt be commented and it still doesnt work. Please help?
 
Upvote 0

Forum statistics

Threads
1,214,583
Messages
6,120,377
Members
448,955
Latest member
BatCoder

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