I don't see anything wrong with your code. It looks similar to the examples in VBA help. I have rewritten it to clarify the workings and reduce the number of casts...
Private Sub ILocateCommandEvents_Accept(ByVal ele As Element, pnt As Point3d, ByVal vw As View) Debug.Assert ele.IsCellElement Dim oCell As CellElement Set oCell = ele.AsCellElement oCell.ResetElementEnumeration Do While oCell.MoveToNextElement(True) Dim oComponent As Element Set oComponent = oCell.CopyCurrentElement If oComponent.IsTextNodeElement Then Dim oNode As TextNodeElement Set oNode = oComponent.AsTextNodeElement Debug.Print "Replace text node line 1 with '" & txt & "'" oNode.textLine(1) = txt ' Global variable oCell.ReplaceCurrentElement oNode End If Loop oCell.Rewrite End Sub