L
Linking to specific cells in pivot table
Hi - this is driving me crazy -- below is code to re-size an object and then
move it -- what seems to be happening is that the it is not being moved as
the code specifies. I have five other blocks of code for five other objects
-- the blocks of code are identical -- and the other five objects are being
moved as specified by the code. Any help is really appreciated!!
'After executing the below code, the object has a 'Left' position of 290 --
as the code specifies, it should be a different number than 290
Sub changepctg()
'M9 = 100
'M10 = 100
'F7 = 0.012
'AutoShape1 = a trapezoid from the "Autoshape" - "Flowchart" menu
Sheets("1st Level Graph (2)").Select
ActiveSheet.Shapes("AutoShape 1").Select
Selection.ShapeRange.Height = Range("M9").Value
Selection.ShapeRange.Width = Range("M10").Value * (1 +
(Range("F7").Value - 0.5))
ActiveSheet.Shapes("AutoShape 1").Select
Selection.ShapeRange.Top = ((Selection.ShapeRange.Top - 15) / 2) + 15
Selection.ShapeRange.Left = ((Selection.ShapeRange.Left - 290) / 2) + 290
move it -- what seems to be happening is that the it is not being moved as
the code specifies. I have five other blocks of code for five other objects
-- the blocks of code are identical -- and the other five objects are being
moved as specified by the code. Any help is really appreciated!!
'After executing the below code, the object has a 'Left' position of 290 --
as the code specifies, it should be a different number than 290
Sub changepctg()
'M9 = 100
'M10 = 100
'F7 = 0.012
'AutoShape1 = a trapezoid from the "Autoshape" - "Flowchart" menu
Sheets("1st Level Graph (2)").Select
ActiveSheet.Shapes("AutoShape 1").Select
Selection.ShapeRange.Height = Range("M9").Value
Selection.ShapeRange.Width = Range("M10").Value * (1 +
(Range("F7").Value - 0.5))
ActiveSheet.Shapes("AutoShape 1").Select
Selection.ShapeRange.Top = ((Selection.ShapeRange.Top - 15) / 2) + 15
Selection.ShapeRange.Left = ((Selection.ShapeRange.Left - 290) / 2) + 290