Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Speed of Macro on 2 PC

Hi,

Can someone please help. We have 2 PCs.

When a macro is run on PC 1, no issue, and I run this almost everyday.

Then I open up the same file and run the same macro on PC 2, the macro
is really really slow.

When I go back to PC 1 and try to run the same file I have the same
issue as PC 2.

What I usually do to resolve the issue is recreate the file from
scratch, put in the macro.
If I run this on PC1, again I have no issue. And I can run it as may
times as I want with no issue.

Again, if I open up the file and run it on PC2, same problem.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 420
Default Speed of Macro on 2 PC

If your code is hiding/showing/deleting/inserting rows or columns, then maybe...

(Saved from a previous post)

Do you see the dotted lines that you get after you do a print or print preview?

If you do
Tools|Options|view tab|uncheck display page breaks

does the run time go back to normal?

You may want to do something like:

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

ActiveSheet.DisplayPageBreaks = False

'do the work (Your code goes here)

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

End Sub

Being in View|PageBreak Preview mode can slow macros down, too.

On 07/12/2010 19:20, misskh wrote:
Hi,

Can someone please help. We have 2 PCs.

When a macro is run on PC 1, no issue, and I run this almost everyday.

Then I open up the same file and run the same macro on PC 2, the macro
is really really slow.

When I go back to PC 1 and try to run the same file I have the same
issue as PC 2.

What I usually do to resolve the issue is recreate the file from
scratch, put in the macro.
If I run this on PC1, again I have no issue. And I can run it as may
times as I want with no issue.

Again, if I open up the file and run it on PC2, same problem.


--
Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro speed Rex Excel Programming 6 April 20th 10 02:14 PM
VBA macro speed NTL[_2_] Excel Programming 3 March 5th 07 03:04 PM
Speed up macro nc Excel Discussion (Misc queries) 2 November 23rd 06 02:10 PM
can anybody speed up this macro matthias Excel Programming 2 October 16th 06 04:26 PM
MACRO Speed? Jim[_25_] Excel Programming 2 September 15th 03 03:50 PM


All times are GMT +1. The time now is 12:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"