ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Problem with speed marco excel 2003 and excel 2007. (https://www.excelbanter.com/excel-programming/409370-problem-speed-marco-excel-2003-excel-2007-a.html)

Petr[_2_]

Problem with speed marco excel 2003 and excel 2007.
 
Hello,

I have question about problem with speed marco. I made marco in excel 2003.
If start the marco in excel 2003 they speed is ok around 1 minut but start
the same marco in excel 2007 speed is very slow 5 - 6 minut.

Can you help me ? I don't know when is problem.

Thank you

Petr


Dave Peterson

Problem with speed marco excel 2003 and excel 2007.
 
Without knowing any details about your macro...

Saved from a previous post:

If you turn off the page break lines
tools|options|view tab|uncheck page breaks (in xl2003)

Does the code work faster?

When you're hiding rows/columns, excel wants to figure out where to draw those
lines each time you change the layout.

Turning of calculation and making sure you're in Normal view will help, too.

Option Explicit
Sub testme()

Dim CalcMode As Long
Dim ViewMode As Long

With Application
CalcMode = .Calculation
.Calculation = xlCalculationManual
.ScreenUpdating = False
End With
ViewMode = ActiveWindow.View
ActiveWindow.View = xlNormalView

'your real code here

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

End Sub

Petr wrote:

Hello,

I have question about problem with speed marco. I made marco in excel 2003.
If start the marco in excel 2003 they speed is ok around 1 minut but start
the same marco in excel 2007 speed is very slow 5 - 6 minut.

Can you help me ? I don't know when is problem.

Thank you

Petr


--

Dave Peterson


All times are GMT +1. The time now is 02:21 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com