Mega Code Archive

 
Categories / VisualBasic Script / Excel
 

For Each-Next is useful for cycling through each member of a collection

Sub Test()     For Each Item In ActiveWorkbook.Sheets         Debug.Print Item.name     Next Item End Sub