Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 287
Default Copying Formats vs Formatting Programatically

Can anyone speak to the performance issues between copying and pasting a
range of formats vs programmatically setting formats? It seems that it is
much faster to copy and paste, than looping through a range, and I am
wondering if anyone has any input on this.

We currently keep a template sheet, but I would like to move away from this.

Thanks in advance.

Regards,
Adam
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default Copying Formats vs Formatting Programatically

Hi Adam,

A couple of notes:
1. try applying your formatting in blocks so you are not applying it to each
cell.
2. have you turned of screenupdating? Application.ScreenUpdating = False
- you need to set it back to True at the end of your procedure(s)

"Adam" wrote:

Can anyone speak to the performance issues between copying and pasting a
range of formats vs programmatically setting formats? It seems that it is
much faster to copy and paste, than looping through a range, and I am
wondering if anyone has any input on this.

We currently keep a template sheet, but I would like to move away from this.

Thanks in advance.

Regards,
Adam

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 287
Default Copying Formats vs Formatting Programatically

Unfortunately we did as much as we could to use ranges, and screen updating,
and yet it seems that copying still seems to out paces the programatic.

Any other thoughts?

"Simon Shaw" wrote:

Hi Adam,

A couple of notes:
1. try applying your formatting in blocks so you are not applying it to each
cell.
2. have you turned of screenupdating? Application.ScreenUpdating = False
- you need to set it back to True at the end of your procedure(s)

"Adam" wrote:

Can anyone speak to the performance issues between copying and pasting a
range of formats vs programmatically setting formats? It seems that it is
much faster to copy and paste, than looping through a range, and I am
wondering if anyone has any input on this.

We currently keep a template sheet, but I would like to move away from this.

Thanks in advance.

Regards,
Adam

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Copying Formats vs Formatting Programatically

Looks like you have your answer.

--
Regards,
Tom Ogilvy


"Adam" wrote in message
...
Unfortunately we did as much as we could to use ranges, and screen

updating,
and yet it seems that copying still seems to out paces the programatic.

Any other thoughts?

"Simon Shaw" wrote:

Hi Adam,

A couple of notes:
1. try applying your formatting in blocks so you are not applying it to

each
cell.
2. have you turned of screenupdating? Application.ScreenUpdating = False
- you need to set it back to True at the end of your procedure(s)

"Adam" wrote:

Can anyone speak to the performance issues between copying and pasting

a
range of formats vs programmatically setting formats? It seems that

it is
much faster to copy and paste, than looping through a range, and I am
wondering if anyone has any input on this.

We currently keep a template sheet, but I would like to move away from

this.

Thanks in advance.

Regards,
Adam



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default Copying Formats vs Formatting Programatically

I often use the following two procedures at the begining and ending of
formatting and sheet changing procedures that run slow:

'---------------------------
Sub Start_Sub()

With Application
.EnableEvents = False
.ScreenUpdating = False
.Calculation = xlManual
End With
ActiveSheet.DisplayAutomaticPageBreaks = False

End Sub
'---------------------------
Sub End_Sub()

With Application
.Calculation = xlCalculationAutomatic
.ScreenUpdating = True
.EnableEvents = True
End With

End Sub
'-------------------------

you can improve them for say Calculation and DisplayAutomaticPageBreaks to
store the existing state in a variable, then set it back in the end_sub
procedure.

Simon

"Adam" wrote:

Unfortunately we did as much as we could to use ranges, and screen updating,
and yet it seems that copying still seems to out paces the programatic.

Any other thoughts?

"Simon Shaw" wrote:

Hi Adam,

A couple of notes:
1. try applying your formatting in blocks so you are not applying it to each
cell.
2. have you turned of screenupdating? Application.ScreenUpdating = False
- you need to set it back to True at the end of your procedure(s)

"Adam" wrote:

Can anyone speak to the performance issues between copying and pasting a
range of formats vs programmatically setting formats? It seems that it is
much faster to copy and paste, than looping through a range, and I am
wondering if anyone has any input on this.

We currently keep a template sheet, but I would like to move away from this.

Thanks in advance.

Regards,
Adam

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
Copying formats - column widths, formats, outlining to worksheets DavidBr318 Excel Worksheet Functions 4 August 14th 09 05:03 AM
Copying printer formats ramona Excel Discussion (Misc queries) 3 August 7th 09 03:45 PM
Copying Formats JoeSpareBedroom Excel Discussion (Misc queries) 9 February 7th 07 06:33 PM
Copying cell formats Stu - Wast Excel Worksheet Functions 5 August 10th 05 06:20 PM
Copying Cell Formats Mark Schreiber Excel Programming 2 December 20th 04 10:53 PM


All times are GMT +1. The time now is 05:05 AM.

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"