Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default copying and renaming a worksheet


What is the VB code for making a copy of an excel worksheet and renaming
it to "total"?

M. Donnelly




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default copying and renaming a worksheet

Matthew,

there may be a simpler way, but I usually just take
advantage of the fact that the copied sheet automatically
becomes the activesheet:

Sheets("Sheet A").Copy
Activesheet.name:="Total"

Cheers, Pete

-----Original Message-----

What is the VB code for making a copy of an excel

worksheet and renaming
it to "total"?

M. Donnelly


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default copying and renaming a worksheet

You'll also need to specify After (or before) or .copy
will create a new workbook for the copied sheet.

Sheets("Sheet A").Copy After:=Activesheet

John P.
-----Original Message-----
Matthew,

there may be a simpler way, but I usually just take
advantage of the fact that the copied sheet

automatically
becomes the activesheet:

Sheets("Sheet A").Copy
Activesheet.name:="Total"

Cheers, Pete

-----Original Message-----

What is the VB code for making a copy of an excel

worksheet and renaming
it to "total"?

M. Donnelly


.

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
Renaming sheets with the same name after copying into a new workbo cdb Excel Discussion (Misc queries) 0 March 14th 06 04:25 PM
Copying and renaming a file Craig Excel Discussion (Misc queries) 1 February 24th 05 10:47 PM
Copying and renaming files on disk Tim C Excel Programming 2 January 28th 04 01:03 AM
copying and renaming sheets Jan Eikeland Excel Programming 9 December 23rd 03 07:55 PM
Copying and renaming worksheets John Young Excel Programming 1 December 17th 03 01:46 AM


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