ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   how to show the position of shapes like "rectangle" (https://www.excelbanter.com/new-users-excel/149298-how-show-position-shapes-like-rectangle.html)

Sumeth

how to show the position of shapes like "rectangle"
 
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.



All times are GMT +1. The time now is 10:02 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com