I have a really strange situation. Basically I have a code which does this
Do While ee.MoveNext If ee.Current.IsDimensionElement Then Set oDim = ee.Current Set oDimdrop = oDim.Drop Do While oDimdrop.MoveNext If oDimdrop.Current.IsTextElement Then
The strange part is that the code is looping on some dimension elements. Most dimensions do not loop and the code runs only once but on a few dimensions the code is looping 3 or 4 times. When the looping dimension is copied the new copied dimension does not loop. I can't figure out why the code thinks that some dimensions have more than one text element.
I am really stuck with this one and your help would be appreciated.
What you mean by "is looping"? Do you want iterate one enumerator twice? Did you use its Reset method?
Did you try to do element validity check like If Not ee.Current Is Nothing ... and If Not oDimdrop.Current Is Nothing...??