Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Copy a Sheet

I am trying to use the following code to copy a master sheet after the last
sheet in the workbook.

Sheets("master").Select
Sheets("master").Copy After:=Sheets(6)

The last part of the above is giving me the trouble. What should the After:=
statement be?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Copy a Sheet

Sheets("master").Copy After:=Sheets(Sheets.count)

--
Regards,
Tom Ogilvy

"Judd Jones" wrote in message
...
I am trying to use the following code to copy a master sheet after the

last
sheet in the workbook.

Sheets("master").Select
Sheets("master").Copy After:=Sheets(6)

The last part of the above is giving me the trouble. What should the

After:=
statement be?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Copy a Sheet

How about a message box to rename the sheet that is created?

"Tom Ogilvy" wrote:

Sheets("master").Copy After:=Sheets(Sheets.count)

--
Regards,
Tom Ogilvy

"Judd Jones" wrote in message
...
I am trying to use the following code to copy a master sheet after the

last
sheet in the workbook.

Sheets("master").Select
Sheets("master").Copy After:=Sheets(6)

The last part of the above is giving me the trouble. What should the

After:=
statement be?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Copy a Sheet


"Judd Jones" wrote in message
...
I am trying to use the following code to copy a master sheet after the

last
sheet in the workbook.

Sheets("master").Select
Sheets("master").Copy After:=Sheets(6)

The last part of the above is giving me the trouble. What should the

After:=
statement be?


Sheets("Master").Copy After:=Sheets(Sheets.Count) 'copy it
Sheets(Sheets.Count).Name = "Master-2" 'rename it
something useful


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 rows from one Data sheet to another sheet based on cell conte John McKeon Excel Discussion (Misc queries) 2 May 15th 10 06:49 AM
Auto Copy/autofill Text from sheet to sheet if meets criteria Joyce Excel Discussion (Misc queries) 0 November 20th 08 11:05 PM
Search for rows in one sheet and copy into another sheet based on customer id [email protected] Excel Worksheet Functions 1 October 22nd 07 03:09 AM
relative sheet references ala sheet(-1)!B11 so I can copy a sheet. RonMc5 Excel Discussion (Misc queries) 9 February 3rd 05 12:51 AM
providing a sheet-copy event or copy CustomProperties Carlos Cortes Excel Programming 2 November 11th 04 08:24 AM


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