I have a Userform that populates a series of Check boxes, Text boxes, and Combo boxes based on the content of a dictionary. The initialization of the Userform dynamically creates all the Control Objects and names them according to the type of control that they are and an index I have provided that corresponds to the dictionary object they were generated from. After the user interacts with the Userform, they click a button to process the results and the information in the controls are written to a class object for use in the next step of the program.
I need to be able to loop through the different controls objects, determine type of control that it is (ProgID
), and check data/value within the object. I am having trouble finding an identifier that will allow me to differentiate between the various types of controls.
Currently, I am looping through the UserForm.Controls.Item
list to have the objects returned to me. I cannot find any method of identifying the type of control from this object to determine what information needs to be pulled from it. Each type of control is written to a different property of the Class object.
Too Long; Didn't Read:
I need a way to determine the ProgID
(or equivalent identifier) of an object returned from the Userform.Controls.Item
function.