PasteSpecial (format only) Selection is too large

  • Thread starter Thread starter Lolt
  • Start date Start date
L

Lolt

I was having a problem to a PasteSpecial (format only) for a few hundred
rows. I finally broke it up into smaller chunks, paste n rows at a time.
Currently doing it in two rows chunks works, but takes a long time.

Is there some way to determine, other than a binary search on chunk size,
how many rows can be pasted at a time. Note: cells involved have
conditional formatting and table formatting

Note: Excel automation project in C#
 
Hi,

YOu should be able to do the entire range with one command, I tested on
65,000 rows without the slightest problem, here is the block of code I used:

Sub PasteFormat()
[A1].Copy
[A2:A65000].PasteSpecial Paste:=xlPasteFormats
End Sub
 
Back
Top