I've generated a userform with textboxes inserted in runtime.
Following Syntax:
Public MyTextBoxes(20) As Control
...
Set UF1 = ThisWorkbook.VBProject.VBComponents.Add(vbext_ct_MSForm)
...
Set MyTextBoxes(TBCount) = UF1.Designer.Controls.Add("Forms.TextBox.1"
After (means really only in the command lines after) calling with following syntax the Userform, I am not able to access the 'Control' - variables any more (for example by command: Cells(1,1).value = MyTextBoxes(0).text):
VBA.UserForms.Add("LabelForm".Show
I get an 'catastrophic error' message.
What is the reason? Can I solve the problem easily?
It is just a real short (hopefully inspiring) description of my problem, but I hope there is somebody out there who can give me some advice or help.
Following Syntax:
Public MyTextBoxes(20) As Control
...
Set UF1 = ThisWorkbook.VBProject.VBComponents.Add(vbext_ct_MSForm)
...
Set MyTextBoxes(TBCount) = UF1.Designer.Controls.Add("Forms.TextBox.1"
After (means really only in the command lines after) calling with following syntax the Userform, I am not able to access the 'Control' - variables any more (for example by command: Cells(1,1).value = MyTextBoxes(0).text):
VBA.UserForms.Add("LabelForm".Show
I get an 'catastrophic error' message.
What is the reason? Can I solve the problem easily?
It is just a real short (hopefully inspiring) description of my problem, but I hope there is somebody out there who can give me some advice or help.