Results 1 to 4 of 4

Thread: Gathering sheet names and displaying them in a specific sheet column

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Regular
    Joined
    Aug 2016
    Posts
    13
    Location

    Gathering sheet names and displaying them in a specific sheet column

    Hi,

    I want to display my results in a Cell/column in a specific sheet(test) on a button click.

    I have this piece of code below. Which is giving the names of all visible sheets but i need them to go to a specific place in that sheet.

        Dim ws As Worksheet, ws1 As Worksheet
        Set ws1 = Sheets("Test")
        i = 1
    
    
        ws1.Columns(1).Insert
        For Each ws In ThisWorkbook.Worksheets
            If ws.Visible = xlSheetVisible Then
                ws1.Cells(i, 1) = ws.Name
                i = i + 1
    
    
    
    
            End If
        Next ws
    Any help would be much appreciated.

    Many thanks
    Last edited by LePig; 09-01-2016 at 04:02 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •