Freedom Computers

Sheets - Changing

Sheets("Sheet1").Activate


**** or ****  Loop though sheets


Dim WS As Worksheet

Set WS = Worksheets(1)

Do Until WS Is Nothing

    ' do something with WS

    Debug.Print WS.Name

    Set WS = WS.Next

Loop


**** or **** Count Sheets


Dim WS As Worksheet

For Each WS In ThisWorkbook.Worksheets

    ' do something with worksheet WS

Next WS

EXCEL