You will not be able to change the program that launches a Hyperlink by modifying the
File Association for any particular file extension (e.g. .JPG). Hyperlinks are based upon the
Hypertext Markup Language (e.g. HTML). You would have to change your default browser in order to change the program that launches the hyperlink and that is an undesirable solution.
You can, however, modify the method by exchanging Assign Macro for Hyperlink. I'll provide a generic example that opens a picture from the public\pictures folder with Paint.
First, insert your picture into a worksheet and position, size and format it as you prefer. Right click it.
!\[\](http://ydewhg.blu.livefilestore.com/y1pRsF_qxlCptD6Uizto5hNn0ZtDjtA8D3yay3z-2SZsoadRnvB8ndiybx_UzhjHFcOM6g014avw3TXBWOJiCDRveZbcs72f3FV/Macro_Assign.png?psid=1)
Select Assign Macro from the right click menu.
!\[\](http://public.blu.livefilestore.com/y1pZ3zuQvwiZPgbjRG6Q7k1T6s33FbKpCHAB2mlhYRt6yjhmDJM-_Wb3DybFiu0I3CjFSFZWETxMK69XRTBKwlWGA/Macro_Create_New.PNG?psid=1)
In the Assign Macro dialog you may optionally rename the suggested macro name but this is unnecessary. Click New. When the Visual Basic Editor opens, paste this code into the empty macro
Picture1_Click function,
Sub Picture1_Click()
sCmdLine = "MSPAINT.EXE " & "C:\Users\Public\Pictures\Profile_Avatar.jpg"
iTaskId = Shell(sCmdLine, 1)
End Sub
Note that the sCmdLine variable constructs the command line <program> <path\picture file>. This is a very common method of launching a file with a program but specific programs should be researched as to their specific command line parameters.
If you leave out the program (e.g. MSPAINT.EXE) and simply use the path and filename of the picture, it will launch according to the default for that file extension (e.g. what you were unable to accomplish earlier with the hyperlinks).
When you are satisfied with your modifications to the command line, press ALT+Q to close the Visual Basic Editor and return to Excel. The picture can now be clicked on to launch the picture in
Paint.
Note that this workbook will have to be saved as a Macro Enabled Workbook (e.g. XLSM).