Looping


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 oMyObject As Object 

For Each oMyObject In colMyItems
    MsgBox MyObject
Next MyObject


For - Next

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



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