![]() |
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! |
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 |
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 . |
All times are GMT +1. The time now is 05:45 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com