dim i as integer = 1

textbox1.text

textboxi.text

so I want to use i like a integer how can I concatenate that?? it is posible?

Try this:

Public Class Form1
    Private count As Integer = 5

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim tb As New TextBox
        tb.Name = "Textbox" & CStr(count)
        tb.Visible = True
        tb.Location = New Point(10, 10)
        tb.Text = tb.Name
        ' add this if you want a click event
        AddHandler tb.Click, AddressOf TextboxClick
        Me.Controls.Add(tb)
        count += 1
    End Sub

    ' add this if you want a click event
    Private Sub TextboxClick(ByVal sender As System.Object, ByVal e As System.EventArgs)
        MessageBox.Show("Textbox clicked")
    End Sub
End Class
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.