Dear all,
I have the following code:
The function builds a form and loads it. It stays in memory and allows other code execution. There are several forms created in this way during my program execution.
I want to reach out these forms and change some of the controls such as Label2 and Label3.
How can I do this from within another function - not from the function which created the actual form.
Is there a way to sequentially loop the controls in the form -in our case, 3 different label controls?
Many thanks
I have the following code:
Code:
Function ShowMyForm(x As Integer, str As String, dbl As Double)
Dim Form As New myUserForm
Load Form
Form.Label1.Caption = "Test"
Form.Label2.Caption = "Test"
Form.Label3.Caption = "Test"
Form.Show VbModeless
End Function
The function builds a form and loads it. It stays in memory and allows other code execution. There are several forms created in this way during my program execution.
I want to reach out these forms and change some of the controls such as Label2 and Label3.
How can I do this from within another function - not from the function which created the actual form.
Is there a way to sequentially loop the controls in the form -in our case, 3 different label controls?
Many thanks