+ Reply to Thread
Results 1 to 3 of 3

Renaming worksheets

Hybrid View

Guest Renaming worksheets 05-17-2005, 01:06 PM
Guest Re: Renaming worksheets 05-17-2005, 01:06 PM
Guest Re: Renaming worksheets 05-17-2005, 01:06 PM
  1. #1
    Greg B
    Guest

    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. #2
    Darrin Henshaw
    Guest

    Re: 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. #3
    Bob Phillips
    Guest

    Re: Renaming worksheets

    Hi Greg,


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

    --

    HTH

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


    "Greg B" <laptopgb@ihug.com.au> wrote in message
    news:d6d5rl$tle$1@lust.ihug.co.nz...
    > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1