Auto copy/paste and rename sheet from text box and command button

  • I need a way to create a new sheet with a command button. Then copy a template sheet and paste the template in the new sheet. Then rename the sheet with the text in the textbox. Any ideas would be greatly appreciated. Thanks guys.

    [SIZE=3]The Only Dumb Question Is A Question Not Asked.[/SIZE]

  • Re: Auto copy/paste and rename sheet from text box and command button


    Hello,

    Paste the following code into VB and link it to the command button and it will grab the name from a textbox labeled textbox1. Then it will rename and copy everything from the template sheet now for the template sheet you will need to rename the sheet to whatever you call that sheet and it will work. Hope This Helps!!!

  • Re: Auto copy/paste and rename sheet from text box and command button


    Thank you very much it works perfect! I have been tinkering for hours and kept coming up empty. Thanks again!!

    [SIZE=3]The Only Dumb Question Is A Question Not Asked.[/SIZE]

  • Re: Auto copy/paste and rename sheet from text box and command button


    It would be a good idea to verify that a worksheet, having the same name as that entered into the textbox, does not exist.
    You did not mention it, but the assumption is you would not want to copy the button to the new sheet.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!