Images From Dropdown Menu

kasen401

New Member
Joined
Aug 10, 2011
Messages
3
I am attempting to use a drop down menu to select from a list of file locations and display an image. The code below works perfectly except I don't know how to change where the image is inserted.

Code:
Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
   If Target.Address <> "$A$1" Then Exit Sub
   On Error Resume Next
   Me.Shapes("MyNewShape").Delete
   With Me.Pictures.Insert(Target.Value)
       .Name = "MyNewShape"
       .Left = Target.Offset(, 1).Left
   End With
End Sub

This allows me to use a drop down menu on Sheet1 to pick from a list of file names on Sheet3. So far so good. The code above drops the image into Sheet1. What I'd like to to do is specify a location on Sheet2 to insert the image.

Any help would be greatly appreciated!
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Sorry if I wasn't clear on the issue. The code definitely works. Although not in the exact way I need. The code in its current form displays the image in relation to the location of the drop down menu's cell. What I'd like to do is specify a location on a different sheet for the image to display but I don't know how to alter the coding above to accomplish this.
 
Upvote 0

Forum statistics

Threads
1,224,502
Messages
6,179,126
Members
452,890
Latest member
Nikhil Ramesh

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