Hi Rolands,
I agree with Jon that the method side effect - the activation of a reference - probably invalidates existing VBA objects, so the code does not work as expected.
I also dislike to use Find and Replace Text tool and using key-ins. Better would be to open the reference at background using OpenDesignFileForProgram. To open a file in "for program" mode brings some limitations, but to iterate a model and find and replace texts should work fine.
With regards,
Jan
I agree with Jon that the method side effect - the activation of a reference - probably invalidates existing VBA objects, so the code does not work as expected.
I also dislike to use Find and Replace Text tool and using key-ins. Better would be to open the reference at background using OpenDesignFileForProgram. To open a file in "for program" mode brings some limitations, but to iterate a model and find and replace texts should work fine.
With regards,
Jan