homelessguestb | welcome to my space

Renaming sheets in a macro

  Escrito el 9 de January del 2009 por wktd.
  • I am making a copy of the active sheet with the following code:

    Sheets(ActiveSheet.Name).Copy After:=Sheets(Sheets.Count)

    This makes a copy with an name like Sheet(2), I want to give it a more meaningful name. I cannot figure out how to do this.

    How can I rename a sheet in a macro?


  • Hi joe,

    Try this one:

    Sheets(ActiveSheet.Name).Copy After:=Sheets(Sheets.Count)
    Sheets(Sheets.Count).Name = OtherName

    Regards

    Oz


  • Nice to hear that joe, anytime.

    Oz


  • Thanks Oz,

    It works great!

    Joe







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Renaming sheets in a macro , Please add it free.

    Catalogado bajo homelessguestb.comedit