Making a dynamic image change depending on which cell is selected

CoogansBluff

Board Regular
Joined
Mar 7, 2021
Messages
59
Office Version
  1. 2013
Platform
  1. Windows
Is it possible to create a dynamic image that would change by selecting a different cell?

I have dynamic images that change based on a value in a cell, but I want to create one that would change based on the cell that is selected regardless of the value that is in it.

For example, let's say that I've selected cell A1 and want the image to change as I hit inter and move down A2, A3, etc. There may or may not be data entered in these cells.
 
What the demonstration code does is basically this:
It is a selection change event code, it runs when the cell you're in changes;
As long as that cell is in the range B1:B9;
When this occurs, the code grabs the name of the image from the cell to the left of the active cell (.Offset(0,-1).Value)
It looks for an image with that name on the Players sheet, if it doesn't find one of that name, you get a message to that effect and the code exits
If it finds an image with that name, it (now) deletes the image on the Main sheet where it's top left cell is in row 1, and puts that named image in cell D1
I hope that answers your question
 
Upvote 0

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Kevin - Thank you. That gives me a better understand of what's behind it. These are good lessons for me. Thanks again!
 
Upvote 0

Forum statistics

Threads
1,223,910
Messages
6,175,320
Members
452,635
Latest member
laura12345

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