Hi, I want to edit an add-in, by adding some shapes (Group) to exsiting one in the same sheet(15 groups they move from a position to another dynamically via the add-in), when I add group 16 manually to the sheet, and I run the macro it never moves but group3 moves instead of him the other groups goes to their right places.
here's the picture :
https://drive.google.com/file/d/0B6nhIMB-ueBhXzA3S1VnVlB6dlE/view?usp=sharing
and the macro :
here's the picture :
https://drive.google.com/file/d/0B6nhIMB-ueBhXzA3S1VnVlB6dlE/view?usp=sharing
and the macro :
Code:
For i = 1 To 16 Sheets(xInvS).Select
'name = "(ID:" + CStr(Cells(i + 2, 1).Value) + ") " + CStr(Cells(i + 2, 2).Value)
name = Cells(i + 2, 2).Value
impact = Cells(i + 2, 4).Value
prob = Cells(i + 2, 5).Value
Sheets(xRiS).Select
ActiveSheet.Shapes("Group " & i).Select
Selection.ShapeRange.IncrementTop (-100 * (impact - 1))
Selection.ShapeRange.IncrementLeft (100 * (prob - 1))
ReDim Preserve tempCount(i)
tempCount(i - 1) = Len(temp) + 1
temp = temp & xRisk & " #" & i & ": " & name & Chr(10)
Next i
Set txtShape = ActiveSheet.Shapes("Text Box 11")
txtShape.DrawingObject.Text = temp
txtShape.DrawingObject.Font.Size = 10
txtShape.DrawingObject.Font.name = "Georgia"
ActiveSheet.Shapes.Range(Array("Text Box 11")).Select
Selection.ShapeRange.IncrementTop 47
txtShape.DrawingObject.Characters(Start:=1, Length:=Len(xMajRi)).Font.Size = 12
For i = 0 To 15
txtShape.DrawingObject.Characters(Start:=tempCount(i), Length:=xLength).Font.FontStyle = "Bold"
Next i
ActiveSheet.PageSetup.PrintArea = "$A$1:$M$16"
ActiveSheet.PageSetup.FitToPagesWide = 1
ActiveSheet.PageSetup.Orientation = xlPortrait
Range("A1").Select
Last edited: