#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 208
Default .Paste

I have the following code:

With Sheets("DirectorCopy")
.Paste

Why doesn't this work? Keep getting Object doesn't support property or
method. I've tried:

..Cells.Paste
..Paste
..ActiveWorksheet.Paste
..Paste("A1")
..ActiveSheet.Paste Destination:=Worksheets("DirectorCopy").Range("A1" )
(which is how the help file says to do it)

None of these work.

what will work here?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default .Paste

The source and Destination of a copy have to be the same size object

Copying a worksheet you need after or before othewise you get a new workbook


1) worksheets("Sheet1").copy 'creates a new workbook with 1 sheet. No
Paste required

2) worksheets("Sheet1").copy after:=sheets(1) 'no paste required

3) Columns("A").Copy
Columns("D").Paste

4) Rows(1).Copy
Rows(6).Paste

5) Range("A1:D10").Copy
Range("D101").Paste or Range("A1011:D110")

6) Range("A1:D1").Copy
Range("A2:A10").Paste

Note the paste can be the first cell of the destination or the entire
destination

"Bishop" wrote:

I have the following code:

With Sheets("DirectorCopy")
.Paste

Why doesn't this work? Keep getting Object doesn't support property or
method. I've tried:

.Cells.Paste
.Paste
.ActiveWorksheet.Paste
.Paste("A1")
.ActiveSheet.Paste Destination:=Worksheets("DirectorCopy").Range("A1" )
(which is how the help file says to do it)

None of these work.

what will work here?

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
Paste and Paste Special No Longer Working - Excel 2003 SheriJ Excel Discussion (Misc queries) 2 January 15th 09 09:23 PM
Automating copy/paste/paste special when row references change Carl LaFong Excel Programming 4 October 8th 07 06:10 AM
Excel cut/Paste Problem: Year changes after data is copy and paste Asif Excel Discussion (Misc queries) 2 December 9th 05 05:16 PM
Copy and Paste macro needs to paste to a changing cell reference loulou Excel Programming 0 February 24th 05 10:29 AM
How do I capture user paste action and convert to Paste Special DonC Excel Programming 0 November 19th 04 01:43 PM


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