Macro's execution time

michlimes

Board Regular
Joined
May 20, 2008
Messages
66
Hello All,

Is it possible that macro is faster on Excel 2003 then on Excel 2007?

Do you know why i Can optimize macro to Excel2007? Which command may slow down my macro?
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

michlimes

Board Regular
Joined
May 20, 2008
Messages
66
My macro is very long, and connect to SQL using adodb...

Macro very often manipulate with cells values - i have read that this operations are slower than in excel2003.

How can I resolve this? Is application.screenupdating help with this?
 
Upvote 0

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
40,344
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. MacOS
Yes, use:
Code:
Application.ScreenUpdating = False
at the start of the routine and reset it to True at the end. Your code will probably still be slower in 2007 but it should speed both versions up. You should also review your code to try and make it as efficient as possible - avoid selecting things, try to avoid writing to one cell at a time if you can write to lots at once and so on.
 
Upvote 0

Forum statistics

Threads
1,190,587
Messages
5,981,799
Members
439,735
Latest member
Tony_P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top