Using myTrans As Transaction = DocBd.TransactionManager.StartTransaction Try Dim myLayerTable As LayerTable = DocBd.LayerTableId.GetObject(OpenMode.ForRead) For Each myLTRid As ObjectId In myLayerTable Dim myLayer As LayerTableRecord = myLTRid.GetObject(OpenMode.ForRead) If myLayer.Name Like LayerName Then If myLayer.IsFrozen Then myLayer.UpgradeOpen() myLayer.IsFrozen = False End If If myLayer.IsLocked Then myLayer.UpgradeOpen() myLayer.IsLocked = False End If End If Next Catch ex As Exception myTrans.Abort() Finally myTrans.Commit() End Try End Using End Sub