Microstation CE VBA Rewrite命令不能用

你好,MS CE版本的Rewrite命令,程序就崩溃,是什么原因?

调试运行到Mycell.Rewrite程序就崩溃了,但是在V8i 和V8 XM运行都没有问题。

Sub TestRenameNestCell()
    Dim Mycell As CellElement
    Dim MyEnum As ElementEnumerator

    sc.ExcludeAllTypes
    sc.IncludeType msdElementTypeCellHeader
    Set MyEnum = ActiveModelReference.Scan(sc)
    
    Do While MyEnum.MoveNext
        On Error Resume Next
        Set Mycell = MyEnum.Current
        Mycell.ResetElementEnumeration
        Do While Mycell.MoveToNextElement
            Dim ele As Element
            Set ele = Mycell.CopyCurrentElement
            If ele.IsCellElement Then
                ele.AsCellElement.Name = "KKK"
                Mycell.ReplaceCurrentElement ele
            End If
        Loop
        Mycell.Rewrite
    Loop
        
End Sub