>On the other hand, I try to reduce the number of createobjects to test whether something is installed
>
>They take time, especially if you have them in a menu skip for clause
>
>So, the first time I need info (reg class, regex, ...) I instantiate the class and cache the result. The next time, I take it from the cache
>
>So, one createobject('Excel.application') does not matter too much
>_________
>
I would say that registry class has less overhead than trying to instantiate the Excel. I agree, that it would be nice to re-use the same instance of registry class if we already instantiated it. But in this code it's created as a local variable. Let me find the original message from Della where she explained why this function was invented.
If it's not broken, fix it until it is.
My Blog