PasteSpecial (format only) Selection is too large

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#
 
S

Shane Devenshire

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top