Results 1 to 6 of 6

List sheets in listbox and show hidden in 2nd column

Threaded View

CobraLAD List sheets in listbox and... 04-10-2015, 11:31 AM
nilem Re: List sheets in listbox... 04-10-2015, 11:35 AM
CobraLAD Re: List sheets in listbox... 04-10-2015, 11:53 AM
nilem Re: List sheets in listbox... 04-10-2015, 12:09 PM
CobraLAD Re: List sheets in listbox... 04-10-2015, 12:27 PM
CobraLAD Re: List sheets in listbox... 04-10-2015, 05:23 PM
  1. #1
    Forum Contributor CobraLAD's Avatar
    Join Date
    07-23-2007
    Location
    Boksburg, South Africa
    MS-Off Ver
    Office 2024
    Posts
    347

    List sheets in listbox and show hidden in 2nd column

    I am trying to get this to load the sheets and show in column 2 whether the sheet is hidden or not. It load all but add an extra blank line in the listbox at the bottom
    I am using a listbox set to 2 columns with no columnheads



    Sub ListSheets()
    Dim i As Long
    UserForm1.ListBox_Sheet.Clear
    ReDim MyArray(ActiveWorkbook.Worksheets.Count, 1)
    For i = 0 To ActiveWorkbook.Worksheets.Count - 1
        MyArray(i, 0) = Sheets(i + 1).Name
        If Sheets(MyArray(i, 0)).Visible = xlSheetHidden Then MyArray(i, 1) = "Hidden"
        If Sheets(MyArray(i, 0)).Visible = xlSheetVeryHidden Then MyArray(i, 1) = "Very Hidden"
    Next i
    UserForm1.ListBox_Sheet.List = MyArray
    End Sub
    Last edited by CobraLAD; 04-10-2015 at 05:23 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 08-14-2014, 06:03 AM
  2. [SOLVED] Hidden sheets show after double click on cell
    By shalhevet in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-13-2013, 06:36 AM
  3. Can't Show Hidden Sheets
    By sayed in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-22-2011, 04:09 AM
  4. Show hidden sheets using a button
    By ncaravela in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-03-2010, 10:11 AM
  5. Hidden/Visible sheets in listbox
    By DRoberts in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-23-2009, 08:18 AM

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