Hi,
'In "Private Sub UserForm_Activate()" I have a line as follows
'.......
nameControl1 = "Label_DisplayInformationForCurrentActivity"
nameControl2 = "Frame_Start"
Call M0_MacrosToF0.ResizingControls
'........
' In the Macro in module "M0_MacrosToF0" there is a line as follows"
'....
Select Case F0_StartForm.Controls(nameControl1).Width - F0_StartForm.Controls(nameControl2).Width
Case Is <= 0 'VARIABLE control is shorter than FIXED
With F0_StartForm.Controls(nameControl2)
F0_StartForm.Width = .Width + 30
.Left = (F0_StartForm.Width - .Width) / 2 - 5
End With
'....
'I am passing "nameControl1" and "nameControl2" to the sub.
'The question is:
'How do I pass the UserForm name the similar way that I am passing the "nameControl1" and "nameControl2", say, with nameForm1 = "F0_StartForm" in order the expression:
"F0_StartForm.Controls(nameControl1)" to look like "nameForm1.Controls(nameControl1)"?
'Many tries finish with error message.
'Thank you....
'In "Private Sub UserForm_Activate()" I have a line as follows
'.......
nameControl1 = "Label_DisplayInformationForCurrentActivity"
nameControl2 = "Frame_Start"
Call M0_MacrosToF0.ResizingControls
'........
' In the Macro in module "M0_MacrosToF0" there is a line as follows"
'....
Select Case F0_StartForm.Controls(nameControl1).Width - F0_StartForm.Controls(nameControl2).Width
Case Is <= 0 'VARIABLE control is shorter than FIXED
With F0_StartForm.Controls(nameControl2)
F0_StartForm.Width = .Width + 30
.Left = (F0_StartForm.Width - .Width) / 2 - 5
End With
'....
'I am passing "nameControl1" and "nameControl2" to the sub.
'The question is:
'How do I pass the UserForm name the similar way that I am passing the "nameControl1" and "nameControl2", say, with nameForm1 = "F0_StartForm" in order the expression:
"F0_StartForm.Controls(nameControl1)" to look like "nameForm1.Controls(nameControl1)"?
'Many tries finish with error message.
'Thank you....