Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Renaming worksheets

I want to have a code to copy the worksheet called "invoice" and once it is
copied I want it to change its name to what ever is in cells "G13"

Thanks again

Greg


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Renaming worksheets

Something like this should work:

Dim Wname As String
Wname = Worksheets("Sheet1").Range("G13")
Worksheets("Sheet1").Copy after:=Worksheets _(Worksheets.Count)
ActiveSheet.Name = Wname

You don't have to use the "after:=Worksheets _(Worksheets.Count)", all
that does is put the new sheet at the end, you can put it wherever you
want.

*** Sent via Developersdex http://www.developersdex.com ***
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Renaming worksheets

Hi Greg,


ActiveSheet.Copy Befo=Worksheets(Worksheets.Count)
ActiveSheet.Name = Range("G13").Value

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Greg B" wrote in message
...
I want to have a code to copy the worksheet called "invoice" and once it

is
copied I want it to change its name to what ever is in cells "G13"

Thanks again

Greg




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 worksheets James Excel Worksheet Functions 0 May 12th 09 11:45 PM
RENAMING WORKSHEETS LEOPARDSHIDEAWAY Excel Worksheet Functions 1 July 26th 07 10:27 PM
Renaming worksheets Mike Allen Excel Discussion (Misc queries) 8 January 21st 07 02:15 AM
Renaming Worksheets rbanks[_10_] Excel Programming 2 June 16th 04 11:51 PM
Renaming worksheets! aiyer[_3_] Excel Programming 3 February 20th 04 12:09 AM


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