I\'m having a heck of the time trying to figure this one out.
I want to pass a Controls collection to a function but I get a type mismatch. Here\'s the function decl
It does seem odd that you can't pass the Page's control collection directly. It might have something to do with the fact that the Pages collection itself is a special type of control collection.
Another alternative would be to declare the "topCtlList" parameter as Object instead of controls. It makes the code less readable and potentially more error prone, but it should remove the type-mismatch error.
Public Function DoStuffToCollection(topCtlList As Object, isLocked As Boolean)
'Debug.Print TypeName(topCtlList)
Dim ctl As Control
For Each ctl In topCtlList
Debug.Print ctl.Name
Next ctl
End Function