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

I have a workbook with 20 sheets and I need to write a macro that will copy a
range from the previous page using a command button.
Example: CmdButton1= copy range Sheet1!A1:B5 into Sheet2!A1:B5, Cmd
Button2= copy Sheet2!A1:B5 into Sheet3!A1:B5, etc. I was writing an
individual macro for each sheet but there must be a more efficient way to do
it. Is there a "copy previous page range" into ActiveSheet?
Thanks a million for any help you can give me.
Regards,


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default copy from previous page

activesheet.previous.Range("A1:b5").Copy ActiveSheet.Range("A1:B5")

--
Regards,
Tom Ogilvy


"Myriam" wrote in message
...
I have a workbook with 20 sheets and I need to write a macro that will

copy a
range from the previous page using a command button.
Example: CmdButton1= copy range Sheet1!A1:B5 into Sheet2!A1:B5, Cmd
Button2= copy Sheet2!A1:B5 into Sheet3!A1:B5, etc. I was writing an
individual macro for each sheet but there must be a more efficient way to

do
it. Is there a "copy previous page range" into ActiveSheet?
Thanks a million for any help you can give me.
Regards,




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default copy from previous page

Thanks!

"Tom Ogilvy" wrote:

activesheet.previous.Range("A1:b5").Copy ActiveSheet.Range("A1:B5")

--
Regards,
Tom Ogilvy


"Myriam" wrote in message
...
I have a workbook with 20 sheets and I need to write a macro that will

copy a
range from the previous page using a command button.
Example: CmdButton1= copy range Sheet1!A1:B5 into Sheet2!A1:B5, Cmd
Button2= copy Sheet2!A1:B5 into Sheet3!A1:B5, etc. I was writing an
individual macro for each sheet but there must be a more efficient way to

do
it. Is there a "copy previous page range" into ActiveSheet?
Thanks a million for any help you can give me.
Regards,





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
Borders from previous page showing up at top of new page Melanie Wagner Excel Discussion (Misc queries) 1 October 17th 07 03:54 AM
Reference previous page Lori Switzer Excel Worksheet Functions 2 September 23rd 06 07:49 PM
continue page numbers from previous worksheet tom Excel Discussion (Misc queries) 1 June 23rd 06 04:22 PM
Running Total from previous page Vanna Excel Worksheet Functions 6 March 5th 06 08:32 AM
Accessing previous page James Agostinho Excel Programming 3 May 2nd 05 07:58 PM


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