Create hyperlinks to files in folder

JorgenKjer

Board Regular
Joined
Aug 1, 2016
Messages
65
Office Version
  1. 2013
Platform
  1. Windows
Hi

Can anyone help with a VBA code that makes a Hyperlink to cells?

This Workbook is a staff list where in column "E" it is possible to use a Hyperlink next to each person to see a photo

The path to the file is e.g.
C: \Users \ Division \ Staff \ 38543_Benny_Mcgee \ 38543_Benny_Mcgee_Photo.JPG

The path shown is
C: \ Users\ Division \ Staff \
+ "C2" + _ (underscore) + "A2" (underscore spaces in name) + \ + "C2" + _ (underscore) + "A2" (underscore between spaces in name) + _ (underscore) "Photo.JPD"


This example should be linked to "E2"

I hopethis makes sense

Regards

Jorgen

https://www.dropbox.com/sh/t3lr38mn75q2epo/AAAAurPfLOAjp1cEu0CQXL-pa?dl=0
 
Last edited:

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
why VBA ?

simple Hyperlink formula can do job.
 
Upvote 0
Hello MUKESHY12390

I have tried formulas, but I have a VBA code which sort the employees out into different sheets by departments and I have not succeeded in getting the formula copied so that the Hyperlink works on the departments sheets that the VBA code sort the employees into

Therefore,I thought it might be possible to create a code that will take that into account

Regards
Jørgen
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,942
Messages
6,122,366
Members
449,080
Latest member
Armadillos

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