I want to control the visibility of certain frames on a form (Word XP). I would like to create a collection of the affected frames. I know I have to create a variable and declare it as a collection and that I use the add method to add things to the collection. How can I add the frames to the collection and how can I have my code cycle through each frame? This is what I tried so far:
Dim frColl As Collection
Dim frCtrl As Frame
frColl.Add frCR
frColl.Add frForPat
frColl.Add frForTM
frColl.Add frLit
frColl.Add frMisc
frColl.Add frPCT
frColl.Add frUSPat
frColl.Add frUSTM
For Each frCtrl In frColl
frCtrl.Visible = True
Next
Thanks for any help you can provide.
Dim frColl As Collection
Dim frCtrl As Frame
frColl.Add frCR
frColl.Add frForPat
frColl.Add frForTM
frColl.Add frLit
frColl.Add frMisc
frColl.Add frPCT
frColl.Add frUSPat
frColl.Add frUSTM
For Each frCtrl In frColl
frCtrl.Visible = True
Next
Thanks for any help you can provide.