
Originally Posted by
Leith Ross
Hello jerseyguy1996,
Each control is part of the UserForm's Control collection. Each object in a collection can be referenced either by it key value, a string that holds the objects name, or an index value that points to position within the collection.
If you loop through the collection by index value, you will still need to check the control's name against a list. The easiest way to do this is with a Select Case statement that contains the names of the controls you don't want to delete. Add the names to the macro you want to keep.
That's perfect. I actually got away with a slight variation of that. I know that the controls that I want to keep are indexed 0 - 8 so my code is:
Bookmarks