Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
Solved

# Excel VBA - move a shape within a cell to the bottom right position of the cell

Posted on 2008-10-07
Medium Priority
1,614 Views
If I have a Shape object (e.g. looping through For Each s In Application.ActiveSheet.Shapes) which is located entirely within a single cell.

How can I determine where to move the shape so it is in the bottom right of that cell?
0
Question by:jnash67
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 2

LVL 81

Expert Comment

ID: 22661364
Shape.Top = Shape.TopLeftCell.Top + Shape.TopLeftCell.Height - Shape.Parent.Height
Shape.Left = Shape.TopLeftCell.Left + Shape.TopLeftCell.Width - Shape.Parent.Width

Kevin
0

LVL 81

Accepted Solution

zorvek (Kevin Jones) earned 2000 total points
ID: 22661408
Correction:

Shape.Top = Shape.TopLeftCell.Top + Shape.TopLeftCell.Height - Shape.Height
Shape.Left = Shape.TopLeftCell.Left + Shape.TopLeftCell.Width - Shape.Width

Kevin
0

Author Closing Comment

ID: 31503921
This was perfect. Thx.
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
###### Suggested Courses
Course of the Month11 days, 10 hours left to enroll