#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default 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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default 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



Reply
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
Speed-up a macro! maca[_3_] Excel Programming 3 July 15th 05 06:40 PM
Speed up macro rn Excel Discussion (Misc queries) 3 February 21st 05 01:25 PM
Using With to speed up macro Wesley[_2_] Excel Programming 2 December 30th 03 10:54 AM
Speed-up macro Thomas[_7_] Excel Programming 2 October 2nd 03 05:55 AM
MACRO Speed? Jim[_25_] Excel Programming 2 September 15th 03 03:50 PM


All times are GMT +1. The time now is 09:38 PM.

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

About Us

"It's about Microsoft Excel"