Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Macro help with copy and insert

I am trying to copy a range of rows from one workbook and insert into
another. I have two windows arranged horizontaly and am activating
workbook(2), selecting the range of rows that i want then selecting the row
in workbook(1) that i want to insert the copied rows above. The rows are not
the same range in diff. workbooks and the workbooks have different names. Is
there a way to select the "active rows" like i can with active cells?

Jason
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Macro help with copy and insert

Hi,

Try this

sub copyselectiontowindow2
Selection.EntireRow.Copy
Windows(2).ActiveCell.EntireRow.PasteSpecial xlPasteAll
end sub
--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Hawkdriver" wrote:

I am trying to copy a range of rows from one workbook and insert into
another. I have two windows arranged horizontaly and am activating
workbook(2), selecting the range of rows that i want then selecting the row
in workbook(1) that i want to insert the copied rows above. The rows are not
the same range in diff. workbooks and the workbooks have different names. Is
there a way to select the "active rows" like i can with active cells?

Jason

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Macro help with copy and insert

When I have multiple worksheets open, lets say (3) and they are arranged
horizontaly so you can see all 3, how does VB move between each worksheet and
how does it relate to the sheets position? If I cannot use a name or date to
differentiate between them what is their order? and does it matter if the
macro is local to one of the sheets or can it be in the "personal"sheet?

"Martin Fishlock" wrote:

Hi,

Try this

sub copyselectiontowindow2
Selection.EntireRow.Copy
Windows(2).ActiveCell.EntireRow.PasteSpecial xlPasteAll
end sub
--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Hawkdriver" wrote:

I am trying to copy a range of rows from one workbook and insert into
another. I have two windows arranged horizontaly and am activating
workbook(2), selecting the range of rows that i want then selecting the row
in workbook(1) that i want to insert the copied rows above. The rows are not
the same range in diff. workbooks and the workbooks have different names. Is
there a way to select the "active rows" like i can with active cells?

Jason

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 Insert Macro Schwimms Excel Discussion (Misc queries) 15 February 2nd 08 12:02 PM
Macro - Insert/Copy John Britto Excel Discussion (Misc queries) 0 November 15th 07 10:01 AM
Macro to Insert and copy entire row CCrew2000 Excel Discussion (Misc queries) 3 June 26th 07 03:16 PM
Macro to insert copy and insert formulas only to next blank row bob Excel Programming 0 June 30th 06 12:02 PM
copy insert macro snax500[_2_] Excel Programming 1 January 14th 05 09:17 PM


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