LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default How can I optimize this code?

Joel wrote:

set ClearRange = Range(cells(iRow,iFirstCol),cells(irow,iLastCol)
ClearRange.ClearContents
ClearRange.ClearComments

I think the Clear comments is what slows the code down significantly.


That was it! Together with Application.Screenupdating = False, it now clears sheets almost instantly! :-)

Gustaf
 
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
Hou would you optimize this code? [email protected] Excel Programming 8 January 17th 08 04:26 PM
Optimize SumProduct Christopher Kennedy Excel Discussion (Misc queries) 9 December 10th 04 04:47 PM
Optimize SumProduct chris Excel Worksheet Functions 3 December 9th 04 08:39 AM
How to optimize and improve that code ? Grek[_15_] Excel Programming 7 August 29th 04 08:41 PM
How can I optimize this code? wullux Excel Programming 2 December 17th 03 07:13 PM


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

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

About Us

"It's about Microsoft Excel"