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

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
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,224,814
Messages
6,181,130
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