ok... I have a row of txtboxes and if the use hits a new row button I want to create a new row of txt boxes. So I want to pass name and number to a procedure and have it create the a new txt box.
Private Sub addtextbox(ByVal xday As String, ByVal xnum As Integer)
Dim MyNewControlName As String
MyNewControlName = xday + Trim(Str(xnum))
Dim MyNewControlName As New TextBox
Dim myloc As New System.Drawing.Point(200,200)
With MyNewControlName
.Text = "test"
.Location = myloc
End With
Me.Controls.Add(MyNewControlName)
Me.Refresh()
End Sub
So I need the name of the new txtbox to be named what is contained in the variable MyNewControlName.
Thanks
Simi
Private Sub addtextbox(ByVal xday As String, ByVal xnum As Integer)
Dim MyNewControlName As String
MyNewControlName = xday + Trim(Str(xnum))
Dim MyNewControlName As New TextBox
Dim myloc As New System.Drawing.Point(200,200)
With MyNewControlName
.Text = "test"
.Location = myloc
End With
Me.Controls.Add(MyNewControlName)
Me.Refresh()
End Sub
So I need the name of the new txtbox to be named what is contained in the variable MyNewControlName.
Thanks
Simi