|
-
Jul 8th, 2002, 01:39 AM
#1
Thread Starter
New Member
Checking for existing controls
hi!
i want ot know that how can i check at run-time that if my specific control is present then i'll unload it
otherwise i can receive number of controls on my form at run-time but i cant get their names from which i can unload them
so any help!
-
Jul 8th, 2002, 03:01 AM
#2
Retired VBF Adm1nistrator
So you want to count how many controls are on your form ?
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Jul 8th, 2002, 03:06 AM
#3
VB Code:
Private Sub Command1_Click()
Dim tx As Variant
MsgBox Form1.Controls.Count
For Each tx In Form1.Controls
MsgBox tx.Name
Next
End Sub
this should help u... count and properties...
-
Jul 8th, 2002, 03:13 AM
#4
Retired VBF Adm1nistrator
Originally posted by khalik
VB Code:
Private Sub Command1_Click()
Dim tx As Variant
MsgBox Form1.Controls.Count
For Each tx In Form1.Controls
MsgBox tx.Name
Next
End Sub
this should help u... count and properties...
heh you beat me to it 
VB Code:
Private Sub Form_Load()
Dim x As Object
For Each x In Form1.Controls
MsgBox x.Name
Next
End Sub
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Jul 8th, 2002, 03:16 AM
#5
Originally posted by plenderj
heh you beat me to it 
VB Code:
Private Sub Form_Load()
Dim x As Object
For Each x In Form1.Controls
MsgBox x.Name
Next
End Sub
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
|