Excel slowing down....

D

Darin Kramer

Hi Guys,

After running several complex macros Excels perfomrance noteably drops.
Im assuming its because the cache is full of previously copied and
stored information..(which may or may not be the only reason...)

Is there a way to force clear this at the end of running some VB, in an
attempt to maintain a consistent speed.

(PErformance increased if you quit out of Excel and then start again...)

Thoughts...?

thanks!

Regards

D

*** Sent via Developersdex http://www.developersdex.com ***
 
D

Dave Peterson

If you can see the pagebreak dotted lines, then excel will slow down.
If you're in View|Page break preview mode, then excel will slow down.

Turning off .screenupdating and changing the .calculationmode to manual may help
speed things up:

Option Explicit
Sub testme()

Dim CalcMode As Long
Dim ViewMode As Long

Application.ScreenUpdating = False

CalcMode = Application.Calculation
Application.Calculation = xlCalculationManual

ViewMode = ActiveWindow.View
ActiveWindow.View = xlNormalView

'your code here

'put things back to what they were
Application.Calculation = CalcMode
ActiveWindow.View = ViewMode
Application.ScreenUpdating = True

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top