Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Chance224
 
Posts: n/a
Default Change macro to paste as last sheet

I have a macro that copies the selected sheet and puts it before all of the
other sheets. How can I change it to put the copy after all of the other
sheets (last sheet in the workbook).

ActiveSheet.Copy Befo=Worksheets(1)
  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default

I think Don meant something more like:
ActiveSheet.Copy After:=Worksheets(worksheets.count)
or
ActiveSheet.Copy After:=Worksheets(sheets.count)



Chance224 wrote:

I have a macro that copies the selected sheet and puts it before all of the
other sheets. How can I change it to put the copy after all of the other
sheets (last sheet in the workbook).

ActiveSheet.Copy Befo=Worksheets(1)


--

Dave Peterson
  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default

Change that last one:
ActiveSheet.Copy After:=Worksheets(sheets.count)
to:
ActiveSheet.Copy After:=sheets(sheets.count)

Dave Peterson wrote:

I think Don meant something more like:
ActiveSheet.Copy After:=Worksheets(worksheets.count)
or
ActiveSheet.Copy After:=Worksheets(sheets.count)

Chance224 wrote:

I have a macro that copies the selected sheet and puts it before all of the
other sheets. How can I change it to put the copy after all of the other
sheets (last sheet in the workbook).

ActiveSheet.Copy Befo=Worksheets(1)


--

Dave Peterson


--

Dave Peterson
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
if a cell contains certain text, cut and paste to another sheet Mili Excel Worksheet Functions 1 April 4th 05 04:18 AM
how do i change the expense statement template macro Mad2691 Excel Worksheet Functions 1 January 28th 05 01:21 PM
Change workbook sheet reference using cell A1 to change a vairable Reed Excel Worksheet Functions 4 January 20th 05 07:15 PM
I get wrong dates when i paste from a different sheet into a new s mmollat Excel Discussion (Misc queries) 2 January 6th 05 07:35 PM
vba to sort group copy paste to another sheet mango Excel Worksheet Functions 0 November 5th 04 04:27 AM


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