ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Obtain an objects current location (https://www.excelbanter.com/excel-programming/432272-obtain-objects-current-location.html)

Jive

Obtain an objects current location
 
Hi

I would like to be able to obtain an objects current location so that it can
be automatically moved based on its current position.

Can you get an objects current X and Y location in points? If so what is the
command?



Jim Cone[_2_]

Obtain an objects current location
 
A Shape, Chart and OLEobject have a TopLeftCell property.
--
Jim Cone
Portland, Oregon USA


"Jive"

wrote in message
...
Hi
I would like to be able to obtain an objects current location so that it can
be automatically moved based on its current position.
Can you get an objects current X and Y location in points? If so what is the
command?



Jacob Skaria

Obtain an objects current location
 
Activesheet.drawingobjects("Rectangle 1").Top
Activesheet.drawingobjects("Rectangle 1").Left

or use the index number as
Activesheet.drawingobjects(1).Top

If this post helps click Yes
---------------
Jacob Skaria


"Jive" wrote:

Hi

I would like to be able to obtain an objects current location so that it can
be automatically moved based on its current position.

Can you get an objects current X and Y location in points? If so what is the
command?




All times are GMT +1. The time now is 01:21 PM.

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