Sub test()
'创建选择集
Dim seleobjts As AcadSelectionSet
Set seleobjts = ThisDrawing.SelectionSets.Add(Time)
seleobjts.SelectOnScreen
'你的代码部分
Dim nline As Integer
Dim lines() As AcadObject
Dim objt As AcadObject
For Each objt In seleobjts
If TypeOf objt Is AcadLine Then
nline = nline + 1: ReDim Preserve lines(1 To nline): Set lines(nline) = objt
End If
Next objt