|
-
Sep 5th, 2005, 02:05 AM
#1
Thread Starter
Hyperactive Member
Help!!! for removing controll added at run time
Dear friends
I have created some controls at run time by using the following code
Private Sub Command1_Click()
Load Text1(Text1.UBound + 1)
Text1(Text1.UBound).Top = Text1(Text1.UBound - 1).Top + 300
Text1(Text1.UBound).Visible = True
End Sub
I also want to remove these controls at run time but I do not know the code for that
Plz!!! help me
Its urgent
Thanks in advance
-
Sep 5th, 2005, 02:11 AM
#2
Re: Help!!! for removing controll added at run time
Unload Text1(Text1.UBound)
-
Sep 5th, 2005, 02:14 AM
#3
Re: Help!!! for removing controll added at run time
Just unload them:
VB Code:
Option Explicit
Private Sub Command2_Click()
Unload Text1(Text1.UBound)
End Sub
Private Sub Form_Load()
Text1(0).Text = ""
End Sub
Private Sub Command1_Click()
Load Text1(Text1.UBound + 1)
Text1(Text1.UBound).Top = Text1(Text1.UBound - 1).Top + 300
Text1(Text1.UBound).Visible = True
End Sub
-
Sep 5th, 2005, 02:29 AM
#4
-
Sep 5th, 2005, 02:35 AM
#5
Re: Help!!! for removing controll added at run time
If they are a control array
-
Sep 5th, 2005, 02:36 AM
#6
Re: Help!!! for removing controll added at run time
Hmmmnnn... I see...
-
Sep 5th, 2005, 05:02 AM
#7
Re: Help!!! for removing controll added at run time
If it is a control array it is a collection object with .LBound and .UBound properties. To access each control you need to reference it by index. If it is not an array then it just points to the control itself.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|