Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default MACRO execution speed

I have a Workbook that is 7.2 MB. It has lots of images, macros, range names, etc. Whenever I try to write data to a cell or cells, or clear cell contents using a macro, it is maddeningly slow. I am currently trying to sort a list of only 44 values using a Userform list box and associated macro, putting the selected values in one column, and the unselected in another column. I could knit a sweater in the time it takes to execute. Are there any settings I need to make to enhance speed? Is the speed (even for such a small list) that much machine dependent? I am using a Pentium III 386 with 512 MB RAM. Is the execution speed being influenced by the size of the workbook? (I actually tried the same sorting routine in a separate Workbook, and the results are almost instantaneous!) Any feedback on this would be greatly appreciated

Eric
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default MACRO execution speed

The obvious question is, is calculation set to automatic? Less
obvious...are there any linked pictures (linked to ranges in particular)?
Is it slow manually entering data, or is it just by macro?

Is the speed (even for such a small list) that much machine dependent? I

am using a Pentium III 386...

Of course machine speed is an issue. But a 386 and a Pentium are different
machines. I had a 386 in 1988 so I'm hopeful that's not what you have.

--
Jim Rech
Excel MVP


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default MACRO execution speed

Hi Eric

My guess is that you have lots of functions. Each time a single cell is
altered then everything recalculates. You can avoid that this way:

Application.Calculation = xlCalculationManual
'code here
Application.Calculation = xlCalculationAutomatic

If your code selects and activates then it's slow per se, and also demanding
on the graphical past of your system. Edit away all those things and try

Application.ScreenUpdating = False
'code here
Application.ScreenUpdating = True

That was the general stuff. Usually, combining the two above will increase
speed a lot. To optimize further we'd have to read the code.
--
HTH. Best wishes Harald
Followup to newsgroup only please

"ericd" skrev i melding
...
I have a Workbook that is 7.2 MB. It has lots of images, macros, range

names, etc. Whenever I try to write data to a cell or cells, or clear cell
contents using a macro, it is maddeningly slow. I am currently trying to
sort a list of only 44 values using a Userform list box and associated
macro, putting the selected values in one column, and the unselected in
another column. I could knit a sweater in the time it takes to execute.
Are there any settings I need to make to enhance speed? Is the speed (even
for such a small list) that much machine dependent? I am using a Pentium
III 386 with 512 MB RAM. Is the execution speed being influenced by the
size of the workbook? (I actually tried the same sorting routine in a
separate Workbook, and the results are almost instantaneous!) Any feedback
on this would be greatly appreciated.

Eric



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default MACRO execution speed

Thanks H. Staff. Adding the Application.Calculation... did wonders. Postponed my going bald by another day!
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 Execution C Brandt Excel Discussion (Misc queries) 2 July 13th 07 07:23 AM
Macro Execution, Part Duo C Brandt Excel Discussion (Misc queries) 1 July 12th 07 10:57 PM
Template Macro Execution Nigel[_8_] Excel Programming 1 January 28th 04 03:10 PM
Triggering Macro Execution Peter M[_3_] Excel Programming 1 January 12th 04 08:20 PM
Restricting Macro Execution John Wilson Excel Programming 1 December 3rd 03 03:43 PM


All times are GMT +1. The time now is 08:28 PM.

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"