• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

macro - auto crrate and name tabs

New Thread since last time files updated were encrypted and no one can check.

Hi
Is it possible for make it so that when I click on the cell L13 and any cell below it in column L, a new tab will automatically be created and the name of the tab will be the name of the cell in D13.
Thank you
David.
 

Attachments

  • Testing_Template_Final_V2.0d.xlsb
    407.9 KB · Views: 3
I don't think a mouse click will do it, but you can teach a worksheet to spot a double-click, figure out the cell that you clicked on, and decide what (if anything) to do about it. Look up the Worksheet_BeforeDoubleClick event. I'll help if you need guidance.
 
I don't think a mouse click will do it, but you can teach a worksheet to spot a double-click, figure out the cell that you clicked on, and decide what (if anything) to do about it. Look up the Worksheet_BeforeDoubleClick event. I'll help if you need guidance.

that does sound good - I googled and went to many site- but can't get it to do what I need to create a new tab
 
To create a new worksheet, use the Worksheets.Add method. Of course you have to put stuff in it, change the name and so forth.
 
To create a new worksheet, use the Worksheets.Add method. Of course you have to put stuff in it, change the name and so forth.

hi

I used the below - but if i create a tab with the same name - then it crashes, how do I get it to say - sheet already created, chose a diffeent name.
I use a list to chose the name from in L11.

Can you adivse?

>>> use code - tags <<<
Code:
Sub TEST_CASE_SHEET_CREATTION()
   
  Sheets.Add.Name = Range("L11").Value
   
  Sheets("Testing_Master_Sheet").Select
 
  
End Sub
 
Last edited by a moderator:
Back
Top