+ Reply to Thread
Results 1 to 4 of 4

Macro paste into sheet name

  1. #1
    Registered User
    Join Date
    11-14-2007
    MS-Off Ver
    2007
    Posts
    61

    Arrow Macro paste into sheet name

    Hi,
    I recorded a macro and wanted to copy and paste into the sheet name.
    I got:
    Please Login or Register  to view this content.

    I don't want to always copy "20110828", but to paste what C1 has.
    How can I do that?
    Tnx!
    T.
    Last edited by Leith Ross; 08-22-2011 at 03:04 AM. Reason: Added code Tags

  2. #2
    Forum Contributor SOS's Avatar
    Join Date
    01-26-2004
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2003
    Posts
    327

    Re: Macro paste into sheet name

    Hi tkuia,

    Firstly you have to qualify which Sheet Range C1 comes from but then you have no need to Select anything. Just use:

    Please Login or Register  to view this content.
    But if it is the current Sheet you want to rename then

    Please Login or Register  to view this content.
    Hope this helps

    Seamus

  3. #3
    Registered User
    Join Date
    11-14-2007
    MS-Off Ver
    2007
    Posts
    61

    Re: Macro paste into sheet name

    Very good! thank you.
    What if I don't know the current sheet name?
    Because I am using : " Sheets.Add After:=Sheets(Sheets.Count) "
    And this gives me different sheet name every time.
    Or... How can I open new sheet with known name?

  4. #4
    Forum Contributor SOS's Avatar
    Join Date
    01-26-2004
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2003
    Posts
    327

    Re: Macro paste into sheet name

    Hi,

    As soon as you add a new sheet it becomes the Active Sheet so therefore

    Please Login or Register  to view this content.
    Bur be aware that if you run this more than once it errors telling you that you already have a sheet called "Whatever".

    Not quite sure how to deal with that part

+ 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