Error on Replace Type
What module type are you replacing ?
What are you replacing it with ?
Is the library that the new object belongs to already attached to the current application?
Like you say, this should normally work OK. However there can be some odd restrictions when you use certain types of objects - for example Batch management objects that have hooks into the batch manager, composite object types that have rules for instantiation etc.
You also say you are "renaming" the instance. Keep the instance names the same when you replace the object. You can try to rename it later.