Layer property example

Private Sub LayerpropertyExample()

'This example returns the Layer property.

     Dim ents As Object

     Dim ent As Object

     Dim ct As Long

 

     Set ents = ActiveDocument.ModelSpace

     ct = ents.Count

     Set ent = ents.Item(ct)

     MsgBox "The Layer property for the last entity is: " & ent.Layer

End Sub