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
|