Z
Zurn
Probs:
I want to make a dynamic form. Pushing the button + has to make new
textboxes on my form.
Searching the net tels me -adding control to a user form's Controls
collection is possible at design time-,I should use the Designer property
which returns me the UserForm object >>> Set Control =
object.add(ProgID,Name,Visible)
http://support.microsoft.com/?kbid=204330
This link is based on Word examples. Using adjusted code on my form does not
work:
In Module1
Sub test()
Set myCheckBox = Form!Form_test.Controls.Add("Forms.CheckBox.1")
With myCheckBox
.Name = "Check1"
...
End With
End Sub
In Form_test module
Private Sub ButtonADD_Click()
Set myCheckBox = ActiveForm.Designer.Controls.Add("Forms.CheckBox.1")
With myCheckBox
.Name = "Check1"
...
End With
End Sub
Anyone ideas?
I want to make a dynamic form. Pushing the button + has to make new
textboxes on my form.
Searching the net tels me -adding control to a user form's Controls
collection is possible at design time-,I should use the Designer property
which returns me the UserForm object >>> Set Control =
object.add(ProgID,Name,Visible)
http://support.microsoft.com/?kbid=204330
This link is based on Word examples. Using adjusted code on my form does not
work:
In Module1
Sub test()
Set myCheckBox = Form!Form_test.Controls.Add("Forms.CheckBox.1")
With myCheckBox
.Name = "Check1"
...
End With
End Sub
In Form_test module
Private Sub ButtonADD_Click()
Set myCheckBox = ActiveForm.Designer.Controls.Add("Forms.CheckBox.1")
With myCheckBox
.Name = "Check1"
...
End With
End Sub
Anyone ideas?