Dim colMyItems As Collection 
Set colMyItems = New Collection

colMyItems.Add "Monday"
colMyItems.Add "Tuesday"
colMyItems.Add "Tuesday"

For - Each

The variable must be of type Object

Dim myObject As Object 

For Each MyObject In colMyItems
    MsgBox MyObject
Next MyObject

For - Next

For lcount = 1 To colMyItems.Count 
   MsgBox colMyItems.Item(lcount)
Next lcount

© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited TopPrevNext