![]() |
|
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 23
|
Is there anyway to specify the left and top distances for a ShapeRange object using vba?
For instance, I can specify the following using a recorded macro: Selection.ShapeRange.Height = 45.07 Selection.ShapeRange.Width = 413.01 Selection.ShapeRange.IncrementLeft -8.49 Selection.ShapeRange.IncrementTop -0.31 But can you specify the actual left and top values (not just increment values)? This is for a object located on a chart. The full code I am using to relocate the object is as such: ActiveSheet.ChartObjects("Chart 11").Activate ActiveChart.ChartArea.Select ActiveChart.Shapes("Group 23").Select Selection.ShapeRange.LockAspectRatio = msoFalse Selection.ShapeRange.Height = 45.07 Selection.ShapeRange.Width = 413.01 Selection.ShapeRange.IncrementLeft -8.49 Selection.ShapeRange.IncrementTop -0.31 Thanks, Corey D. |
|
|
|
|
|
#2 |
|
New Member
Join Date: Feb 2002
Posts: 10
|
I think there is a .Top and a .Left property that you can use for shaperanges
|
|
|
|
|
|
#3 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
Hi Corey
Just use With ActiveSheet.ChartObjects("Chart 11") .Left = 0 .Top = 0 End With |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|