Create Textbox dynamicly
Posted: 26 Feb 2016, 06:13
Hi,
I have a custom control (Benutzersteuerelement) which creates a textbox dynamicly:
Set txtEdit = UserControl.controls.Add("VB.TextBox", "txtEdit")
In my project I can place a EditCtlsLibUCtl.TextBox on a form, but I cannot create it dynamically like this:
Private WithEvents txtEdit As EditCtlsLibUCtl.TextBox
...
Set txtEdit = UserControl.controls.Add("EditCtlsLibUCtl.TextBox", "txtEdit")
It says: runtime error 739 The ProgId must be used. The ProgID of this control is EditCtlsLibUCtl.TextBox.1
But
Set txtEdit = UserControl.controls.Add("EditCtlsLibUCtl.TextBox.1", "txtEdit")
doesn't work either...
What can I do?
Peter
I have a custom control (Benutzersteuerelement) which creates a textbox dynamicly:
Set txtEdit = UserControl.controls.Add("VB.TextBox", "txtEdit")
In my project I can place a EditCtlsLibUCtl.TextBox on a form, but I cannot create it dynamically like this:
Private WithEvents txtEdit As EditCtlsLibUCtl.TextBox
...
Set txtEdit = UserControl.controls.Add("EditCtlsLibUCtl.TextBox", "txtEdit")
It says: runtime error 739 The ProgId must be used. The ProgID of this control is EditCtlsLibUCtl.TextBox.1
But
Set txtEdit = UserControl.controls.Add("EditCtlsLibUCtl.TextBox.1", "txtEdit")
doesn't work either...
What can I do?
Peter