I am trying to use a string variable instead of hardcoding the forms name as below.
FrmMainControl.Controls
but want to use this.
Forms("FrmMainControl").Controls
However, i get the error Sub or Function not defined. Please help. This is in VBA btw.
Assuming the form is
loaded you can search theUserFormscollection;