Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 391
Default Why Copy/Paste fails using Offset & Resize of myRange?

2003


Copy/Paste is usually simple. That said, I am doing something wrong below.

The following code is excerpted:

Dim myRange as Range, TopCell as Range, TopCell as Range
wks as worksheet
MyColumnsToProcess as long


Note: myRange is on Sheets(1)

myRange = wks.Range(TopCell, BotCell).Resize(, MyColumnsToProcess)

myRange.Offset(0, 5).Resize(, 1).Copy ' attempt to disect a "column" in myRange for the Paste next

Sheets("1200").Range("A" & myRow).Paste

The error is # 438 Object doesn't support this property or method.

Thoughts?

TIA EagleOne
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 391
Default Why Copy/Paste fails using Offset & Resize of myRange?

Thanks for your time and thoughts.

In this case, the Copy then Paste involve different sheets so I do not believe that is the problem.

EagleOne

Dallman Ross <dman@localhost. wrote:

In ,
spake thusly:

Sheets("1200").Range("A" & myRow).Paste

The error is # 438 Object doesn't support this property or
method.


I'm just going to make a guess, based on a similar problem I
had recently. It could be that what I'm describing doesn't
apply to your situation. You'll tell us, I'm sure. :-)

It turns out that if there are array formulas present and
you copy a row, you can't paste it back over the same row.
(At least, this was so for me with Excel 2002.)

E.g., I copied Row 1 and tried to paste it to Rows 1-100
and got that same error. However, I was able to paste
to Rows 2-100. So that's how I got around the problem.

=dman=

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 391
Default Why Copy/Paste fails using Offset & Resize of myRange?


Got it!

myRange.Offset(0, 5).Resize(, 1).Copy Sheets("1200").Range("A" & myRow)


Thanks for any who spent time.

wrote:

myRange.Offset(0, 5).Resize(, 1).Copy ' attempt to disect a "column" in myRange for the Paste next

Sheets("1200").Range("A" & myRow).Paste

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
Using an offset formula for the reference in a relative reference Cuda Excel Worksheet Functions 6 November 15th 06 05:12 PM
Macro question Chris Excel Worksheet Functions 12 July 7th 06 01:23 AM
How to Select a relative range with Using "Find" and Offset() Dennis Excel Discussion (Misc queries) 7 July 27th 05 03:57 PM


All times are GMT +1. The time now is 01:25 PM.

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"