gilad_gy


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

thanks.




Re: duplicating VBA objects

Andy Pope


Hi,

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.top + textbox10.Height + 3
.Left = textbox10.left
.Text = "hello World"
End With

End Sub







Re: duplicating VBA objects

gilad_gy

Hi,

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.