What is wrong with below code:

Public Sub S_ORG_BURST()

		'Dim tmp_点(2) As Double
		'Dim tmp_セット名 As String
		'Dim tmp_subセット名 As String
		Dim obj_sset As SelectionSet
		Dim obj_SUBsset As SelectionSet
		Dim obj_Entity() As ObjectId = Nothing
		Dim l_entityCNT As Integer

		Dim obj_blockref As BlockReference
		Dim i_attrCNT As Short
		Dim v_attr As Object

		Dim obj_Text As DBText
		Dim v_entity As Object

		Dim l_objID() As ObjectId = Nothing
		Dim l_objID2() As ObjectId

		Dim l_objCNT As Integer
		Dim l_delCNT As Integer
		Dim l_cnt As Integer
		Dim l_cnt2 As Integer
		Dim i_cnt As Short

		On Error GoTo S_ORG_BURST_Err

		Dim doc As Document = acApp.DocumentManager.MdiActiveDocument
		Dim db As Database = doc.Database
		Dim ed As Editor = doc.Editor
		Dim tm As Transaction = db.TransactionManager.StartTransaction()
		Dim currSpace As BlockTableRecord = tm.GetObject(db.CurrentSpaceId, OpenMode.ForWrite)

		l_objCNT = 0

		''オブジェクトの選択
		Do
			Dim selRes As PromptSelectionResult = ed.GetSelection()
			If selRes.Status = PromptStatus.Cancel Then
				GoTo S_ORG_BURST_Ext ' キャンセルキー
			End If
			If selRes.Status = PromptStatus.OK Then
				If selRes.Value.Count > 0 Then
					obj_sset = selRes.Value
					Exit Do
				End If
			End If
			If selRes.Status = PromptStatus.Error Then
				GoTo S_ORG_BURST_Ext
			End If
		Loop

		l_entityCNT = 0


		''選択図形をループ
		For l_cnt = 0 To obj_sset.Count - 1
			Dim id As ObjectId = obj_sset.Item(l_cnt).ObjectId
			Dim ent As Entity = tm.GetObject(id, OpenMode.ForRead, False, True)
			Dim layRec As LayerTableRecord = tm.GetObject(ent.LayerId, OpenMode.ForRead)

			If Not layRec.IsLocked() Then
				'If TypeOf ent Is BlockReference Then
				If id.ObjectClass.Name = RXClass.GetClass(GetType(BlockReference)).Name Then
					''変数に格納
					obj_blockref = ent
					''属性の配列を取得
					''属性値を持っている場合のみ処理
					For Each attId As ObjectId In obj_blockref.AttributeCollection
						Dim attRef As AttributeReference = tm.GetObject(attId, OpenMode.ForRead)
						If attRef.Invisible = False Then
							If attRef.Visible = True Then
								If Trim(attRef.TextString) <> "" Then
									''属性値を取得し、テキストを作成
									obj_Text = New DBText()
									obj_Text.TextString = attRef.TextString()
									obj_Text.Position = attRef.Position()
									obj_Text.Height = attRef.Height()

									currSpace.AppendEntity(obj_Text)
									tm.AddNewlyCreatedDBObject(obj_Text, True)

									''属性値のプロパティをテキストに反映

									obj_Text.Justify = attRef.Justify()
									obj_Text.AcadObject.Backward = attRef.AcadObject.Backward
									obj_Text.Height = attRef.Height()
									obj_Text.Position = attRef.Position()
									obj_Text.Layer = attRef.Layer()
									obj_Text.Linetype = attRef.Linetype()
									obj_Text.LinetypeScale = attRef.LinetypeScale()
									obj_Text.LineWeight = attRef.LineWeight()
									obj_Text.Oblique = attRef.Oblique()
									obj_Text.Rotation = attRef.Rotation()
									obj_Text.WidthFactor = attRef.WidthFactor()
									obj_Text.TextStyleId = attRef.TextStyleId
									If obj_Text.Justify <> AttachmentPoint.BaseLeft Then
										obj_Text.AlignmentPoint = attRef.AlignmentPoint
									End If
									obj_Text.Color = attRef.Color()
									obj_Text.AcadObject.UpsideDown = attRef.AcadObject.UpsideDown
								End If
							End If
						End If
					Next
					''ブロック参照のOBJECTIDを保存
					ReDim Preserve l_objID(l_objCNT)
					l_objID(l_objCNT) = obj_blockref.ObjectId
					l_objCNT = l_objCNT + 1
				Else
					''ブロック参照以外のオブジェクトを変数に格納
					ReDim Preserve obj_Entity(l_entityCNT)
					obj_Entity(l_entityCNT) = ent.ObjectId()
					l_entityCNT = l_entityCNT + 1
				End If

			End If

		Next l_cnt


		''ブロック参照を分解
		If l_objCNT > 0 Then
			l_delCNT = 0
			For l_cnt = LBound(l_objID) To UBound(l_objID)
				obj_blockref = tm.GetObject(l_objID(l_cnt), OpenMode.ForRead)
				If obj_blockref.AcadObject.XScaleFactor.Equals(obj_blockref.AcadObject.YScaleFactor) And obj_blockref.AcadObject.XScaleFactor.Equals(obj_blockref.AcadObject.ZScaleFactor) Then
					Dim objCol As New DBObjectCollection()
					obj_blockref.Explode(objCol)
					obj_blockref.UpgradeOpen()
					obj_blockref.Erase()
					''分解後のオブジェクトの中に属性があればOBJECTIDを保存
					For Each obj As DBObject In objCol
						If Not TypeOf obj Is AttributeDefinition Then
							currSpace.AppendEntity(obj)
							tm.AddNewlyCreatedDBObject(obj, True)
						Else
							''分解後の属性を削除
							obj.Dispose()
						End If
					Next
				End If
			Next l_cnt

		End If

		''ブロック以外を選択
		''ブロック以外のオブジェクトが選択されていた場合はセレクションセットに追加
		If l_entityCNT > 0 Then
			ed.SetImpliedSelection(obj_Entity)
			doc.AcadDocument.SendCommand("EXPLODE" & vbCr & "P" & vbCr & vbCr)
		End If

S_ORG_BURST_Ext:
		tm.Commit()

		ed.SetImpliedSelection({})
		ed.Regen()

		Exit Sub

S_ORG_BURST_Err:

		tm.Abort()
		MsgBox("S_ORG_BURST.Error")

	End Sub