I have a procedure which toggles a bunch of columns/rows between hidden and unhidden to make a "printable" extract. It runs fine. The problem is that once I try to edit the print setup, such as by defining the print range or using print preview mode, the procedure runs extremely slowly. I think what is happening is that Excel is recalculating page breaks with every column that is hidden or revealed. The only way to get it running fast again is to clear the print area using file|print area|clear print area, then saving/closing/reopening the file.
I have tried placing
ActiveSheet.PageSetup.PrintArea = ""
and
ActiveSheet.ResetAllPageBreaks
at the beginning and end of the procedure, but they don't seem to work.
Is there a way to force Excel to forget all about any print settings? Or is there an equivalent to ScreenUpdating=False to suppress pagination until the procedure is done?
Thanks,
Johnny Geo
I have tried placing
ActiveSheet.PageSetup.PrintArea = ""
and
ActiveSheet.ResetAllPageBreaks
at the beginning and end of the procedure, but they don't seem to work.
Is there a way to force Excel to forget all about any print settings? Or is there an equivalent to ScreenUpdating=False to suppress pagination until the procedure is done?
Thanks,
Johnny Geo