HYPERLINK to display images

ray_b

New Member
Joined
Dec 25, 2015
Messages
34
Hi all;

I have been going through multiple examples on the web over the week trying to get this working to no avail.. Throwing in the towel and asking for some help!

Here's what I am looking for:

Select a stock ticker (and its region) to display a specific chart. It would look like something like this:

1576695795797.png


I have these two (2) issues:

1) Can't (even) HYPERLINK, CONCATENATE to get a link Excel recognizes. I tried the followings:

a) =HYPERLINK(CONCATENATE(D5,$D$2,D6,$D$3,D7))

b) =HYPERLINK("Stockwatch"
&$D$2
&"&region="
&$D$3
&"&d1=20190819&d2=20191218&per=d&npdivs=20&width=830&priceheight=400&ptype=candle&indheight=100&log=F&ind1=none&ind2=none&ind3=vol&ind1p1=12&ind1p2=26&ind1p3=9"
&"&ind2p1=12&ind2p2=25&ind2p3=50&ind3p1=12&ind3p2=25&ind3p3=50&pov1=mae&pov2=mae&pov3=mas&pov1p1=50&pov1p2=&pov2p1=8&pov2p2=&pov3p1=20&pov3p2=&newsInd=T")
(note: last part was split in 2 to avoid the 255 characters limit).

Both options return to: #VALUE!

Whole link for the current chart is: https://www.stockwatch.com/Chart/Hi...&pov2p1=8&pov2p2=&pov3p1=20&pov3p2=&newsInd=T


2) Displaying the image

I have read that a VBA code would be required to achieve such display. Is this true? If so, would anyone have any idea what this code could look like? I mostly have no experience in coding.

Thanks.

Wishing you all the peace and joy in this Holidays Season.
 
Usually that means that two have 2 subroutines with the same name. But the "~" makes me wonder if that is what's going on.

I would create a copy of your original workbook, make sure there is no VBA in the workbook at all, then try adding the code again.

It looks like you've added the code in the right places from what I can see, so hopefully doing it from scratch will fix this weird issue.
 
Upvote 0

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
@lrobbo314 ;

Never mind. I figured what was the problem. I still had both codes for the pictures. I just need to figure in the code how to re-position the chart a little but other than that Wowww.... It works perfectly.

Thanks a lot for your help and assistance.

Wishing you and your family all the peace and joy in this Holidays Season.
 
Upvote 0
Usually that means that two have 2 subroutines with the same name. But the "~" makes me wonder if that is what's going on.

I would create a copy of your original workbook, make sure there is no VBA in the workbook at all, then try adding the code again.

It looks like you've added the code in the right places from what I can see, so hopefully doing it from scratch will fix this weird issue.

Yess! All fixed up!!
Thanks!
 
Upvote 0
Awesome!

───────────────────░█▓▓▓█░▇▆▅▄▃▂
──────────────────░█▓▓▓▓▓█░▇▆▅▄▃▂
─────────────────░█▓▓▓▓▓█░▇▆▅▄▃▂
──────────░░░───░█▓▓▓▓▓▓█░▇▆▅▄▃▂
─────────░███░──░█▓▓▓▓▓█░▇▆▅▄▃▂
───────░██░░░██░█▓▓▓▓▓█░▇▆▅▄▃▂
──────░█░░█░░░░██▓▓▓▓▓█░▇▆▅▄▃▂
────░██░░█░░░░░░█▓▓▓▓█░▇▆▅▄▃▂
───░█░░░█░░░░░░░██▓▓▓█░▇▆▅▄▃▂
──░█░░░░█░░░░░░░░█▓▓▓█░▇▆▅▄▃▂
──░█░░░░░█░░░░░░░░█▓▓▓█░▇▆▅▄▃▂
──░█░░█░░░█░░░░░░░░█▓▓█░▇▆▅▄▃▂
─░█░░░█░░░░██░░░░░░█▓▓█░▇▆▅▄▃▂
─░█░░░░█░░░░░██░░░█▓▓▓█░▇▆▅▄▃▂
─░█░█░░░█░░░░░░███▓▓▓▓█░▇▆▅▄▃▂
░█░░░█░░░██░░░░░█▓▓▓▓▓█░▇▆▅▄▃▂
░█░░░░█░░░░█████▓▓▓▓▓█░▇▆▅▄▃▂
░█░░░░░█░░░░░░░█▓▓▓▓▓█░▇▆▅▄▃▂
░█░█░░░░██░░░░█▓▓▓▓▓█░▇▆▅▄▃▂
─░█░█░░░░░████▓▓▓▓██░▇▆▅▄▃▂
─░█░░█░░░░░░░█▓▓██▓█░▇▆▅▄▃▂
──░█░░██░░░██▓▓█▓▓▓█░▇▆▅▄▃▂
───░██░░███▓▓██▓█▓▓█░▇▆▅▄▃▂
────░██▓▓▓███▓▓▓█▓▓▓█░▇▆▅▄▃▂
──────░█▓▓▓▓▓▓▓▓█▓▓▓█░▇▆▅▄▃▂
──────░█▓▓▓▓▓▓▓▓▓▓▓▓▓█░▇▆▅▄▃▂
 
Upvote 0
And, the way it gets triggered is by a worksheet event. Right click on the tab that says the sheet name on it. Then click 'View Code'. Then paste the code below. Let me know if you have any questions.

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("D2")) Is Nothing Then Main
End Sub

@lrobbo314 ;

Ok, one last question on this matter, if I may. I re-organized my sheet exactly the way I want it to be and everything is fine. I would just need one more thing: A worksheet event for cell D4 as well, downloading a new chart when a change occurs in either cell D2 or D4.

I tried to copy this code for D2 and just past it on the bottom with D4 but didn't work out...

Thanks again.
 
Upvote 0
Never mind! Found it! :)
Thanks

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("D2,D4")) Is Nothing Then Main
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,542
Messages
6,179,421
Members
452,913
Latest member
JWD210

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