<>
Unless I'm mistaken, Marc'Antonio Alessi's code will delete groups which is the opposite of what you want.
Dan
Sorry for late... I do not think so, try with attached file:
1) Delete entities of group Foo1 and Foo2
2) (ALE_Utl_PurgeGroupsNoName (vla-get-ActiveDocument (vlax-get-acad-object)))
3) the function ALE_Utl_PurgeGroupsNoName:
- do not delete groups anonimous or not with more of 1 entity
- delete only anonimous groups (empty or 1 entity)