Goran Level: Moderator
 Registered: 16-05-2002 Posts: 1681
|
Re: Remove a created object in a form
It depends on how did you create your controls at run-time. If it was by Load, then you can remove them with Unload. If it was with Controls.Add method, then you should use Controls.Remove method. Now, if you have only textboxes, then it would be the best to load them using Load function, so you can will need only this code
Private sub Text1_Click(INdex as integer)
If index > 0 Then
Unload Text1(index)
Else
Text1(0).Visible = False
End If
end sub |
____________________________
If you find the answer helpful, please mark this topic as solved.
|