Hi all,

on a form, i've got 10 textbox in a row. lets say that i've got x rows.

the user need x+1 rows.

how do i add the last row


Re: duplicating VBA objects

Andy Pope


You can add controls at run time with code like the following.
Private Sub UserForm_Initialize()

Dim cntTBox As MSForms.TextBox

Set cntTBox = Me.Controls.Add("Forms.textbox.1")
With cntTBox
.Name = "textbox11"
.Top = + textbox10.Height + 3
.Left = textbox10.left
.Text = "hello World"
End With

End Sub

Re: duplicating VBA objects



well that is a great code thanks for that.

i'm having a trouble to remove a Object....

a few strange errors occurs....

i'll be happy if you could help me with that...

thanks gilad.