Although I can't see how it would help, when in doubt I always put in
Application.Calculation = xlManual
I don't understand your code though. For example why do you add null strings to
the front and back of Filename?
And what's up with the sPath variable? You don't assign it, but use it to call
a Replace(...) function that doesn't seem to be part of VBA so I presume it's a
UDF of yours? What's it do?
I'd start by just putting MsgBox breaks scattered into the code until you can
figure out which line (or lines) are taking minutes to execute.
Good luck...
Bill
----------------------
> I have a program (see program below) that sometimes takes several minutes to
> run .
[quoted text clipped - 29 lines]
>
> End Sub
maperalia - 26 Jan 2006 18:58 GMT
Bill;
Thanks very much!!!. I have tried it but I do not have any different than
before....
I will keep my program as is because I do not know is server or my computer..
Best regards.
Maperalia
> Although I can't see how it would help, when in doubt I always put in
>
[quoted text clipped - 47 lines]
> >
> > End Sub
Bill Martin - 26 Jan 2006 19:54 GMT
And have you tried using the MsgBox commands (or the debugger) to step through
the code to see where all the time is actually consumed?
Bill
------------------------
> Bill;
> Thanks very much!!!. I have tried it but I do not have any different than
[quoted text clipped - 56 lines]
>>>
>>>End Sub