To me, it is still not very clear of what exactly your intention is: do you want to list all block references in the drawing (regardless which layout they are in); or you want to list block's name that has block reference being inserted into the drawing (say, the drawing contains 10 block definitions, thus 10 block names, but only 5 blocks have block references inserted. So, you want that 5 block names listed, not all 10 names).
Let's assume you want to latter. So, you can do this way:
1. loop through all layouts, including ModelSpace find all AcadBlockReference; or use AcadSelectionSet to select all block references with filter;
2. For each block reference, save the block's name into a collection/array, as long as the block name does not exists in that collection/array.
Following is the code (pseudo/not tested, I omitted the filter for selectionset, but you could refer to the first reply from @Anonymous for it):
'' This function would returns an array of name of blocks that have block references inserted into the drawing.
Public Function FindUsedBlocks() As Variant
Dim names() As String
Dim i As Integer
Dim j As Integer
Dim blk As AcadBlockRefernece
Dim ss As AcadSelectionSet
Set ss = FindAllBlockReferences
For i=0 to ss.Count-1
Set blk = ss(i)
If i=0 the
ReDim Preserve names(j)
names(j)=blk.EffectiveName
j=j+1
Else
If Not NameExists(names, blk.EffectivaName) Then
ReDim Preserve names(j)
names(j)=blk.EffectiveName
j=j+1
End If
End If
Next
FindUsedBlocks = names
End Function
Private Function SelectAllBlockRefernces() As AcadSelection
Dim ss As AcadSelection
On Error Resume Next
Set ss=ThsiDrawing.SelectionSets.Add("MySS")
If err.Numer<>0 Then
set ss=ThisDrawing.SelectionSet("MySS")
End If
'' define filter here....
ss.Select acSelectionSetAll, [filter]
Set SelectAllBlockReferences=ss
End Function
Private Function NameExists(names As Variant, name As String) As Boolean
Dim i As Integer
For i = 0 To Ubound(names)
If UCase(names(i) = UCase(name)
NameExists = True
Exit Function
End If
Next
NameExists=False
End Function
Hopefully I did not guess your intention wrong.