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

I know this is simple, but how do I shift the paste of dRange down 1
row? I'm pretty sure I need to use offset somewhere but I can't figure
out where.

LC = Lastcol(WB2.Sheets(2)) + 1

Set sRange = WB1.Columns("A:M")
Set dRange = WB2.Sheets(2).Columns(LC)

sRange.Copy dRange


Thanks,
-- Dan

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,090
Default Copy/Paste problem

dRange.Offset(1)
HTH Otto
"Dan R." wrote in message
ups.com...
I know this is simple, but how do I shift the paste of dRange down 1
row? I'm pretty sure I need to use offset somewhere but I can't figure
out where.

LC = Lastcol(WB2.Sheets(2)) + 1

Set sRange = WB1.Columns("A:M")
Set dRange = WB2.Sheets(2).Columns(LC)

sRange.Copy dRange


Thanks,
-- Dan



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default Copy/Paste problem

You can copy 'Columns to Columns' or 'Range to Range', but not
'Columns to a Range'.
Try something like this:

Set sRange = WB1.Range("A1:M10")
Set dRange = WB2.Sheets(2).Cells(2, LC)
sRange.Copy dRange

Hth,
Merjet


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default Copy/Paste problem

That's right, thanks merjet.

-- Dan

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
copy and paste problem in vb Blubber Excel Discussion (Misc queries) 5 November 13th 08 05:54 PM
Copy/Paste Problem Seti Excel Worksheet Functions 0 August 31st 06 05:10 PM
VBA Copy Paste Problem Richard Slacum Excel Programming 5 December 29th 05 07:10 PM
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/Paste Problem -JB- Excel Programming 1 October 1st 03 06:31 PM


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