I added 2 lines from the drawing toolbar on to a fresh worksheet. I could
manipulate the existing lines by going through the Lines collection or the
Shapes collection.
Maybe there's something in here that helps:
Option Explicit
Sub testme01()
Dim myLine1 As Line
Dim myLine2 As Shape
Dim myLine3 As Shape
Dim myLine4 As Line
With ActiveSheet
Set myLine1 = .Lines("Line 1")
myLine1.ShapeRange.Flip msoFlipHorizontal
Set myLine2 = .Shapes("line 2")
myLine2.Flip msoFlipVertical
With .Range("b3:c9")
Set myLine3 = .Parent.Shapes.AddLine _
(beginx:=.Left, _
beginy:=.Top, _
endx:=.Left + .Width, _
endy:=.Top + .Height)
'myLine3.Flip msoFlipHorizontal
myLine3.Name = "Line 3"
End With
With .Range("e3:g9")
Set myLine4 = .Parent.Lines.Add _
(x1:=.Left, _
y1:=.Top, _
x2:=.Left + .Width, _
y2:=.Top + .Height)
'myLine4.Flip msoFlipHorizontal
myLine4.Name = "Line 4"
End With
End With
End Sub
the Lines stuff is a hold over from xl95. They're a "hidden" element of xl97
and greater. You can still find info within the Object browser if you want.
But I'd recommend that you use the shapes collection. You'll be able to get
help out of VBA's help system.