![]() |
Macro Speed
Hi,
I have a worksheet with a list of approx. 1,000 rows and 16 columns. A macro is used to run some fairly complex code to arrange the list in different ways. This works fine and takes almost no time. I also have code that sets the print area, depending on the list arrangement, and then prints. This works OK. The problem is that once the print code has been run it takes ages - enough time to take the dog for a walk - for the list handling code to run. Any ideas ? Don |
Macro Speed
yep.
'forces the pagebreaks on a new worksheet ActiveWindow.View = xlPageBreakPreview ActiveWindow.View = xlNormalView 'NOW you can disable the display of the pagebreaks activesheet.DisplayAutomaticPageBreaks = False activesheet.DisplayPageBreaks = False -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam Don Lloyd wrote : Hi, I have a worksheet with a list of approx. 1,000 rows and 16 columns. A macro is used to run some fairly complex code to arrange the list in different ways. This works fine and takes almost no time. I also have code that sets the print area, depending on the list arrangement, and then prints. This works OK. The problem is that once the print code has been run it takes ages - enough time to take the dog for a walk - for the list handling code to run. Any ideas ? Don |
Macro Speed
Thanks a million,
Is it necessary to set both types of PageBreaks to false? Don "keepITcool" wrote in message .com... yep. 'forces the pagebreaks on a new worksheet ActiveWindow.View = xlPageBreakPreview ActiveWindow.View = xlNormalView 'NOW you can disable the display of the pagebreaks activesheet.DisplayAutomaticPageBreaks = False activesheet.DisplayPageBreaks = False -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam Don Lloyd wrote : Hi, I have a worksheet with a list of approx. 1,000 rows and 16 columns. A macro is used to run some fairly complex code to arrange the list in different ways. This works fine and takes almost no time. I also have code that sets the print area, depending on the list arrangement, and then prints. This works OK. The problem is that once the print code has been run it takes ages - enough time to take the dog for a walk - for the list handling code to run. Any ideas ? Don |
Macro Speed
not sure, wont hurt.
-- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam Don Lloyd wrote : Thanks a million, Is it necessary to set both types of PageBreaks to false? Don "keepITcool" wrote in message .com... yep. 'forces the pagebreaks on a new worksheet ActiveWindow.View = xlPageBreakPreview ActiveWindow.View = xlNormalView 'NOW you can disable the display of the pagebreaks activesheet.DisplayAutomaticPageBreaks = False activesheet.DisplayPageBreaks = False -- keepITcool www.XLsupport.com | keepITcool chello nl | amsterdam Don Lloyd wrote : Hi, I have a worksheet with a list of approx. 1,000 rows and 16 columns. A macro is used to run some fairly complex code to arrange the list in different ways. This works fine and takes almost no time. I also have code that sets the print area, depending on the list arrangement, and then prints. This works OK. The problem is that once the print code has been run it takes ages - enough time to take the dog for a walk - for the list handling code to run. Any ideas ? Don |
Macro Speed
Thanks again,
I just added Activesheet.DisplayPageBreaks = False to the end of the print code and it worked fine. Don "keepITcool" wrote in message .com... not sure, wont hurt. -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam Don Lloyd wrote : Thanks a million, Is it necessary to set both types of PageBreaks to false? Don "keepITcool" wrote in message .com... yep. 'forces the pagebreaks on a new worksheet ActiveWindow.View = xlPageBreakPreview ActiveWindow.View = xlNormalView 'NOW you can disable the display of the pagebreaks activesheet.DisplayAutomaticPageBreaks = False activesheet.DisplayPageBreaks = False -- keepITcool www.XLsupport.com | keepITcool chello nl | amsterdam Don Lloyd wrote : Hi, I have a worksheet with a list of approx. 1,000 rows and 16 columns. A macro is used to run some fairly complex code to arrange the list in different ways. This works fine and takes almost no time. I also have code that sets the print area, depending on the list arrangement, and then prints. This works OK. The problem is that once the print code has been run it takes ages - enough time to take the dog for a walk - for the list handling code to run. Any ideas ? Don |
All times are GMT +1. The time now is 11:49 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com