+ Reply to Thread
Results 1 to 5 of 5

Macro to Create Worksheet 'xxxx' and list All Worksheets in Workbook

Hybrid View

  1. #1
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Macro to Create Worksheet 'xxxx' and list All Worksheets in Workbook

    One way:

    Public Sub Sheet_Index()
    Dim ws As Worksheet
    Application.DisplayAlerts = False
    On Error Resume Next
    Sheets("xxxx").Delete
    On Error GoTo 0
    Application.DisplayAlerts = True
    Sheets.Add After:=Sheets(ThisWorkbook.Sheets.Count)
    ActiveSheet.Name = "xxxx"
    Cells(1, "A") = "Sheet(s)"
    For Each ws In ThisWorkbook.Worksheets
        If ws.Name <> ActiveSheet.Name Then Cells(Rows.Count, "A").End(xlUp).Offset(1) = ws.Name
    Next ws
    End Sub

  2. #2
    Forum Contributor
    Join Date
    07-28-2008
    Location
    Leamington Spa, UK
    MS-Off Ver
    2010
    Posts
    142

    Re: Macro to Create Worksheet 'xxxx' and list All Worksheets in Workbook

    That's Great -Worked 1st Time! Much Appreciated

    Cheers

  3. #3
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988

    Re: Macro to Create Worksheet 'xxxx' and list All Worksheets in Workbook

    Next time If you're satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  4. #4
    Forum Contributor
    Join Date
    07-28-2008
    Location
    Leamington Spa, UK
    MS-Off Ver
    2010
    Posts
    142

    Re: Macro to Create Worksheet 'xxxx' and list All Worksheets in Workbook

    I know how to - I just forgot. Sorry

    Cheers

+ 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