how to show the position of shapes like "rectangle"

S

Sumeth

hi, anyone help me pls.
I try to create a simple game for leader by using excel. I create ten
rectangle boxes. And individual moving box in each time I need to check the
position of the rectangle box which is wrong or correct?

Here is my code :

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Range("a1").Value = Shapes("rectangle 1").Left
Range("b1").Value = Shapes("rectangle 1").Top
End Sub

if I use that code I have to click on the sheet except the rectangle box so
that it will show the position of the rectangle box.

But what I need is when I move the rectangle by using mouse up I want
cell(a1) and cell(b1) show the position of rectangle automatically.

Some one give me the solution pls.
Thanks for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top