Hi

I get this error if I move away from excel to some other window while my macro is running.

-2147417848 automation error the object invoked has disconnected from its clients

I was not getting this earlier.

MSDN says "Make sure that you set Option Explicit at the top of each file in your project."

I am adding some sheets at run time. How can I add Option Explicit at the top of added sheets? And, will that solve my problem?

Are there any otehr suggestions?

Thanks
Ajay