ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Moving Objects in a Worksheet (https://www.excelbanter.com/excel-discussion-misc-queries/64271-moving-objects-worksheet.html)

Native

Moving Objects in a Worksheet
 
Hello: I would like to move objects depending upon inputted criteria.
For example, if I have the word "apple" in cell A1, I want to move a
box around the world Apple in a list.

So far, I can record a macro moving an object and get the commands
like:

Selection.ShapeRange.IncrementLeft -81#

or

Selection.ShapeRange.IncrementLeft 35.25

, but I don't know how to say go "here" or "there". Is there a way to
have an object move to a specific location by say some sort of grid
address vs. saying go left 35.25 units?

Also, what does the # after the number mean? EG-".IncrementLeft -81#"

Thanks!


Native

Moving Objects in a Worksheet
 
I APOLOGIZE BUT I DO NOT KNOW HOW TO DELETE THIS THREAD
I AM GOING TO POST THIS IN THE PROGRAMMING FORUM


Native

Moving Objects in a Worksheet
 
Scratch that! :) Figured out a way to get done what I needed.

Utilized the following:

ActiveSheet.Shapes("Oval 1").Top = Range("E14").Top <----moves
object to row 14
ActiveSheet.Shapes("Oval 1").Select
Selection.ShapeRange.IncrementTop -5 <---moves object slightly up
(5 points)
ActiveSheet.Shapes("Oval 1").Left = Range("E14").Left <---- moves
object to column E

Please let me know if this is incorrect or could be improved! Thanks!



All times are GMT +1. The time now is 01:32 AM.

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