0

I'd like to create a macro that goes through the whole range (which is one column). The Hyperlink needs to be created depending on the cell's value, which is always a link to one of my folders on the computer. (for example: "C:\Users\me\workstuff")

I'm not even familiar with VBA - Hyperlink relations, so I don't know where to start.

Thanks for any future suggestions!

Sub linker()

Dim ws As Worksheet
Worksheets("2023").Select
Range("J:J").Select

For Each Cell In Range

ActiveCell.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:="", TextToDisplay:="Link to the files"

End Sub

1 Answer 1

2

Do you really need VBA for this? There's an excellent HYPERLINK formula to use :

enter image description here

Sign up to request clarification or add additional context in comments.

2 Comments

Dear Gowire, no I don't need especially VBA. The Problem is, on my workplace, the link is now allowed to be opened. Can you help me out with that, so I can see the picture/formula somehow?
@balazshorvath1229 I am not sure what you mean. But it sounds that your Excel document, the security policies, or your user environment is restricted to follow links from within Excel. Your Excel document may be set to an "untrusted" document.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.