View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Gustaf Gustaf is offline
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