Gary,
This will help you iterate thru all you blocks and modify the tag
[code]
Public Sub UPDATE_TB_of_sheet()
Dim oSS As AcadSelectionSet
Dim oBlkRef As AcadBlockReference
Dim vTB_Attribues As Variant
Dim i As Integer
Dim grpCode(0 To 1) As Integer
Dim dataVal(0 To 1) As Variant
' Build a selection set of group codes and values to filter for: Text or Mtext.
grpCode(0) = 0
dataVal(0) = "INSERT"
grpCode(1) = 2
dataVal(1) = "ODS_TB" '<-block name to search for
Set oSS = BuildSelectionSet("get 'em", grpCode, dataVal, True)
For Each oBlkRef In oSS
If UCase(oBlkRef.Name) = "ODS_TB" Then
vTB_Attribues = oBlkRef.GetAttributes
For i = LBound(vTB_Attribues) To UBound(vTB_Attribues)
If vTB_Attribues(i).TagString = "OF_SHEET" Then
vTB_Attribues(i).TextString = "11"
End If
Next
End If
Next
End Sub
'return a selection set
Public Function BuildSelectionSet(strPrompt As String, vGroupCode As Variant, vDataValues As Variant, Optional bSelectAll As Boolean = False) As AcadSelectionSet
Dim ssetObj As AcadSelectionSet
'create a new selection set object
Set ssetObj = vbdPowerSet("SS01")
If strPrompt <> vbNullString Then
ThisDrawing.Utility.Prompt strPrompt
AcadApplication.Update
End If
If Not IsEmpty(vGroupCode) Then
' choice between selecting onscreen and selecting all
If bSelectAll = True Then
ssetObj.Select acSelectionSetAll, , , vGroupCode, vDataValues
Else
ssetObj.SelectOnScreen vGroupCode, vDataValues
End If
Else
ssetObj.SelectOnScreen
End If
Set BuildSelectionSet = ssetObj
End Function
'Simple sel set object creation function.
'vba will return an error if the sel set object already exists
'in the SSETS collection
Public Function vbdPowerSet(strName As String) As AcadSelectionSet
Dim objSelSet As AcadSelectionSet
Dim objSelCol As AcadSelectionSets
Set objSelCol = ThisDrawing.SelectionSets
For Each objSelSet In objSelCol
If objSelSet.Name = strName Then
objSelCol.Item(strName).Delete
Exit For
End If
Next
Set objSelSet = objSelCol.Add(strName)
Set vbdPowerSet = objSelSet
End Function
[/code]