ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macros go slower than a turtle in mud (https://www.excelbanter.com/excel-programming/293655-macros-go-slower-than-turtle-mud.html)

BOHICA

Macros go slower than a turtle in mud
 
I do not know what the exact problem is, but on some machines, my
macros I have created (like my machine) run like the wind just as I
intend them to...but on other machines, they run like a one legged man
with a bad knee. WHY?!?!

The machines might be the exact same running the same service packs
and patches. Some days, the macros run fast too. What the hell is
happening to my macros? Do they take union breaks or something?

Thanks in advance

JE McGimpsey

Macros go slower than a turtle in mud
 
Hard to tell if you don't give us the code.

One thought: Are your machines that race like the wind set for Manual
Calculation?
(You can set that in your macro, then set it back when it exits:

Dim oldCalcMode As Long
With Application
oldCalcMode = .Calculation
.Calculation = xlCalculationManual
End With

'your code

Application.Calculation = oldCalcMode

You might take a look at Charles Williams' site, both for speed tips and
for his FastExcel application:

http://www.decisionmodels.com/optspeed.htm

In article ,
(BOHICA) wrote:

I do not know what the exact problem is, but on some machines, my
macros I have created (like my machine) run like the wind just as I
intend them to...but on other machines, they run like a one legged man
with a bad knee. WHY?!?!

The machines might be the exact same running the same service packs
and patches. Some days, the macros run fast too. What the hell is
happening to my macros? Do they take union breaks or something?

Thanks in advance


Dave Peterson[_3_]

Macros go slower than a turtle in mud
 
And if you're inserting/deleting rows or columns, then if the user is showing
the pagebreaks, then your macro could slow down--xl want's to determine where
those little dashed lines go after each change.

Try putting something like this at the top of your code:
ActiveSheet.DisplayPageBreaks = False

And make sure you have screenupdating turned off. But if it were on, it would
have affected all pcs.

Application.screenupdating = false
'''your code
application.screenupdating = true



BOHICA wrote:

I do not know what the exact problem is, but on some machines, my
macros I have created (like my machine) run like the wind just as I
intend them to...but on other machines, they run like a one legged man
with a bad knee. WHY?!?!

The machines might be the exact same running the same service packs
and patches. Some days, the macros run fast too. What the hell is
happening to my macros? Do they take union breaks or something?

Thanks in advance


--

Dave Peterson



All times are GMT +1. The time now is 04:15 AM.

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