Çizim nesneyi imlecin bulunduğu noktada olsun

Katılım
18 Mart 2005
Mesajlar
63
Excel Vers. ve Dili
office2007 türkçe
Makro ile çizim nesneleri oluşturuyorum. Ancak bunlar daima kodda belirtilen konumda oluşuyor. Kodda nasıl bir değişiklik yaparsam nesne imlecin bulunduğu noktada olur?


Sub grup()
On Error Resume Next
ActiveDocument.Shapes.AddShape(msoShapeRectangle, 186, 221, 132, 54).Select
ActiveDocument.Shapes.AddLine(366, 256, 495, 256).Select
For i = 1 To 1000
ActiveDocument.Shapes.Range(Array("Line " & i + 1, "Rectangle " & i)).Select
Selection.ShapeRange.Group.Select
Next i
End Sub
 
Üst