Private Sub CommandButton1_Click()
Dim filtertype As Integer
Dim filterdata As String
Dim S As AcadSelectionSet
Dim O As Variant
filtertype = 0
filterdata = "TEXT"
Me.Hide
Set S = ThisDrawing.SelectionSets.Add("A11AA")
S.SelectOnScreen
Dim A As AcadEntity
For Each A In S
S.SelectOnScreen FILTERTYEP, filterdata
A.color = acBlue
A.Update
Next A
End Sub