Hi I've got this code from a post. But when i'm trying to use it it gives the error "invalid entity name" on the sst.erase line. Public Sub EraseAll() Dim sst As AcadSelectionSet 'selection set object Set sst = ThisDrawing.SelectionSets.Add("ToErase") 'add the selection set to sst.Select acSelectionSetAll 'select all entities (no filters) If MsgBox("About to erase " & sst.count & " entities. Continue?", vbExclamation + vbYesNo + vbDefaultButton2, "Confirm Erase") = vbYes Then sst.Erase 'erase the selection End If sst.Delete 'delete the selection set object (not the entities) End Sub