Results 1 to 4 of 4

Adding Sheets to ListBox in Userform

Threaded View

  1. #1
    Forum Contributor
    Join Date
    02-05-2010
    Location
    Exeter, England
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    180

    Adding Sheets to ListBox in Userform

    The code below will add sheets 12 onwards to listbox3. I have 2 other sheets that I would like to add which are veryhiddensheets those being sheets 7 & 8. Can this be done without including sheets 9,10,11 ?


    Private Sub UserForm_Initialize()
        Dim i As Integer
        For i = 12 To ThisWorkbook.Worksheets.Count
            Me.ListBox3.AddItem Worksheets(i).Cells(3, 1).Value
        Next i
    End Sub
    Last edited by zimbo109; 05-23-2010 at 04:28 AM.

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