Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default PasteSpecial

I want to copy the format of 2 cells to the rest of the worksheet using
PasteSpecial. It works for a small range, but when I copy it to a bigger
range of cells I get a runtime error 1004 "Markierung ist zu gross"
which can be translatet to "Selection too big".
Even when I use a small range and try to copy it in a loop I get this
error after some sucellfull copies. Is there some kind of copy buffer
that has to be deleted?

Here is my code with just a small destination range that works

xlWs.Range("C2:C3").Select
xlApp.Selection.Copy
xlWs.Range("C2:W11").Select
xlApp.Selection.PasteSpecial Paste:=xlPasteFormats, _
Operation:=xlNone, SkipBlanks:=False, Transpose:=False
xlApp.CutCopyMode = False

When I increase the destination range from C2:W11 for example to
C2:W3000 I get the error.

Thanks,
Karl
Please reply to newsgroup, not e-mail
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default PasteSpecial

Curious. When I run this code, which pastes to a much larger range, I get
no error.

Range("A1:A2").Copy
Range("A1:IV65536").PasteSpecial xlPasteFormats


--
Jim Rech
Excel MVP
"KL" wrote in message
...
|I want to copy the format of 2 cells to the rest of the worksheet using
| PasteSpecial. It works for a small range, but when I copy it to a bigger
| range of cells I get a runtime error 1004 "Markierung ist zu gross"
| which can be translatet to "Selection too big".
| Even when I use a small range and try to copy it in a loop I get this
| error after some sucellfull copies. Is there some kind of copy buffer
| that has to be deleted?
|
| Here is my code with just a small destination range that works
|
| xlWs.Range("C2:C3").Select
| xlApp.Selection.Copy
| xlWs.Range("C2:W11").Select
| xlApp.Selection.PasteSpecial Paste:=xlPasteFormats, _
| Operation:=xlNone, SkipBlanks:=False, Transpose:=False
| xlApp.CutCopyMode = False
|
| When I increase the destination range from C2:W11 for example to
| C2:W3000 I get the error.
|
| Thanks,
| Karl
| Please reply to newsgroup, not e-mail


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
Pastespecial and cut Ron[_23_] Excel Programming 4 April 26th 04 02:14 AM
pastespecial Claude Excel Programming 2 February 24th 04 01:21 PM
pastespecial in vba cornishbloke[_13_] Excel Programming 7 December 31st 03 01:02 PM
vba pastespecial joao Excel Programming 2 November 14th 03 03:31 PM
pastespecial billQ Excel Programming 2 July 29th 03 11:39 PM


All times are GMT +1. The time now is 11:22 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"