View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
minimaster minimaster is offline
external usenet poster
 
Posts: 73
Default Howto declare and fill a custom collection of worksheets ?

I figured it out myself.

Sub WorksheetCollectioTest()

Dim wslist As New Collection

wslist.Add Worksheets("Sheet1")
wslist.Add Worksheets("Sheet2")

Dim ws As Worksheet

For Each ws In wslist
Debug.Print ws.Name
Next ws

End Sub