Screen coordinates transferred to image placement

schmidt1962

New Member
Joined
May 31, 2013
Messages
25
If anyone has ideas about this I would greatly appreciate it. I am looking for a macro or some vba language that I can modify. A user is presented with an image in excel of an aerial view. On top of that image, I want to enable whereever they decide to click, another image placed on top of it (the user selects the type of image prior to activating the mouse click.


When I have excel place the images, it does so whereever it decides. i want the user to decide where they are placed with the click of a mouse.
 

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".
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
With ActiveSheet.Shapes.Range(Array("Picture 2")) ' change picture name
.Top = Target.Top
.Left = Target.Left
End With
End Sub
 
Upvote 0
This is sweet! Thank you! Just tried it out and think I can adapt to to what i need. Greatly appreciated.
 
Upvote 0
As a follow up, if I want to place images with labels 1, 2, 3,4,5 etc one at a time, how would I do that? Can you store pictures in an array, and call them out in a loop? Thanks for all your help
 
Upvote 0
you can store pictures in an other sheet with names picture 1, 2 3 ... and call them out in a loop
 
Upvote 0
Patel - I have another question. I actually do store all my images in a worksheet called "Pictures". Can you help me out with a little more code? I thought that I had figured it out, but it isn't working. I am not quite sure how to do it. My goal is to copy the image from "Pictures" then place it on the aerial view on "Survey" worksheet.

Thank you!
 
Upvote 0
Patel,

I have posted of file here:
http://www.sendspace.com/file/kmwld6

The goal is, to have the user be able to select which images (numbers) they want, then go to the map and fire them with the mouse in the location desired (as opposed to having them placed there by the loop).

Thank you for your help. Much appreciated.

Eric
 
Upvote 0

Forum statistics

Threads
1,216,746
Messages
6,132,478
Members
449,729
Latest member
davelevnt

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