Results 1 to 6 of 6

Thread: WORKAROUND: How To: Creating Arrays of Excel Sheets ???

Threaded View

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    May 2004
    Location
    Carlisle, PA
    Posts
    1,045

    WORKAROUND: How To: Creating Arrays of Excel Sheets ???

    Esteemed Forum Participants and Lurkers:
    ===============================

    EXCEL

    I have an Excel Workbook with a bunch of sheets in 3 major categories. I can easily walk through the sheets and determine the category, but I can't seem to create Arrays of categorized sheets to work with.

    Here is the template for what I want to do:
    Code:
    Dim asht As Worksheet
    Dim i as Integer
    
    'HOW TO DIM an Array of Sheets?
    Dim ShtCat(3) as WorkSheets
    
    For Each asht In ActiveWorkbook.Worksheets
        'Find the Category for each Sheet
        Select Case Left(asht.Name, 4)
            Case "Cat1"
                i = 1
            Case "Cat2"
                i = 2
            Case "Cat3"
                i = 3
        End Select
        
        'Add this sheet into Sheets Array ShtCat(i) ???
    
    Next
    Thank you for any and all comments, suggestions, and assistance.
    Last edited by Webtest; Mar 9th, 2005 at 03:46 PM. Reason: Workaround suggestion
    Blessings in abundance,
    All the Best,
    & ENJOY!

    Art . . . . Carlisle, PA . . USA

Posting Permissions

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



Click Here to Expand Forum to Full Width