View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
T. Erkson T. Erkson is offline
external usenet poster
 
Posts: 11
Default VBA Function gets slower every time I use it...

Just curious, are you using ScreenUpdating?

Sub yourSubHere()
Application.ScreenUpdating = False
...your code here...
Application.ScreenUpdating = True
End Sub


--
Toby Erkson -- Portland, Oregon -- http://www.bidata.net/

"Carlo" wrote in message
...
Hi all

I have a function which splits text for me.
I autofit the width of the column and compare
it to the width that i have declared. if the column
width is wider than mine, i go to the next line.
this functions works slow, but I've noted, that
every time the function runs again, it is getting
slower. first time it runs about 30seconds, 2nd
time it runs 45seconds, 3rd time more then a
minute!! I don't know why this happens, could
that have something to do with memory which
isn't released exactly?

Thanks for any help

Carlo