Making a dynamic image change depending on which cell is selected

CoogansBluff

Board Regular
Joined
Mar 7, 2021
Messages
55
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

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
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,215,129
Messages
6,123,210
Members
449,090
Latest member
bes000

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