Re: Excel slowing down....

Tech-Archive recommends: Fix windows errors by optimizing your registry



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

Darin Kramer wrote:

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 ***

--

Dave Peterson
.



Relevant Pages

  • Re: problems with ClearContents in Excel 2003
    ... If you can see the pagebreak dotted lines, then excel will slow down. ... Dim ViewMode As Long ... CalcMode = Application.Calculation ... I ran the same macro on a co-workers computer ...
    (microsoft.public.excel)
  • Re: Help - Excel 2003 Macro execution SLOW!
    ... In fact, not only the Macro in Excel is slow, the ... >> Dim ViewMode As Long ... >> CalcMode = Application.Calculation ...
    (microsoft.public.excel)
  • Re: Excel 2000 vs 2003
    ... Even adding the suggested lines the macro is much more fast in Excel ... Dave Peterson wrote: ... > CalcMode = Application.Calculation ... > Simon Shaw wrote: ...
    (microsoft.public.excel.programming)
  • Re: Excel 2000 vs 2003
    ... Sub yoursub() ... CalcMode = Application.Calculation ... Simon Shaw wrote: ... > the following code runs very quickly in Excel 2000, ...
    (microsoft.public.excel.programming)