+ Reply to Thread
Results 1 to 8 of 8

Automatically Updating Worksheet List

Hybrid View

  1. #1
    Registered User
    Join Date
    03-25-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    21

    Automatically Updating Worksheet List

    Hi All,

    Is there a way to have a list of worksheets in a workbook that automatically updates when you add a new worksheet or remove a worksheet?

    Regards,

    JM

  2. #2
    Forum Contributor aganesan99's Avatar
    Join Date
    04-26-2013
    Location
    Chennai, India
    MS-Off Ver
    Excel 2010
    Posts
    129

    Re: Automatically Updating Worksheet List

    Hi Jim,

    Try the macro in the attached file. You need to run the macro every time you add or delete a tab.

    If you like it click on "Add Reputation"

    Thanks,
    aganesan99
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    03-25-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Automatically Updating Worksheet List

    Hi Aganesan99,

    Unfortunately this is not what I am looking for, I can already insert the names using formula, so there would be no need to then have a macro to do what could be done with the formula (which would need to be updated every time a new sheet is added). What I am looking for is a way to update the list automatically when a new sheet is added - with no need for users to run anything - as this part of the report will be hidden.

    I already have a formula inserts the worksheet names into a list - maybe a way for this formula to automatically update when a new worksheet has been added/removed?

    Regards
    JM

  4. #4
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Automatically Updating Worksheet List

    Hi All,


    You could copy this code in sheet "LIST"

    Private Sub Worksheet_Activate()
    
    Application.ScreenUpdating = False
    
    Range("A:A").ClearContents
    
    For i = 1 To Sheets.Count
            Cells(i, 1) = Sheets(i).Name
        Next i
    Application.ScreenUpdating = False
    
    End Sub



    Hope it helps
    Attached Files Attached Files
    Last edited by canapone; 11-12-2013 at 07:09 AM.
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  5. #5
    Registered User
    Join Date
    03-25-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Automatically Updating Worksheet List

    Canapone,

    Absolutely Perfect!

    Thanks

  6. #6
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Automatically Updating Worksheet List

    Ciao,

    thank you for feedback.

  7. #7
    Registered User
    Join Date
    03-25-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Automatically Updating Worksheet List

    Hi Canapone,

    Your answer was perfect, but my question was not - is there a way for the list to appear in the B column and not the A column?

    Regards,
    JM

  8. #8
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Automatically Updating Worksheet List

    Hi,

    --------


    Private Sub Worksheet_Activate()
    
    Application.ScreenUpdating = False
    
    Range("B:B").ClearContents
    
    For i = 1 To Sheets.Count
            Cells(i, 2) = Sheets(i).Name
        Next i
    
    Application.ScreenUpdating = False
    
    End Sub

    Regards
    Attached Files Attached Files
    Last edited by canapone; 11-12-2013 at 09:47 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Automatically updating a list of numbers
    By khank in forum Excel General
    Replies: 4
    Last Post: 07-25-2012, 10:52 AM
  2. [SOLVED] Drop Down List Not Updating Automatically
    By RBan in forum Excel General
    Replies: 1
    Last Post: 06-23-2006, 02:35 PM
  3. [SOLVED] automatically updating summary worksheet
    By srpettew in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-22-2006, 02:10 AM
  4. automatically updating a summary worksheet
    By srpettew in forum Excel General
    Replies: 5
    Last Post: 04-19-2006, 01:20 AM
  5. [SOLVED] help wanted in updating worksheet automatically
    By Madhu in forum Excel General
    Replies: 2
    Last Post: 06-01-2005, 09:05 AM

Tags for this Thread

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