[Message Deleted]
-
why would you want to remove it? I rather hide it
YourDomainUpDown.Visible = False
Regards: Didi -
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
For Each c As Control In Me.Controls
If TypeOf c Is TextBox Then
If c.Text.Length = 0 Then c.Dispose()
End If
Next
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End SubInstead of checking for checkboxes you can also check for domainupdown, and any control. In this example code, you can check what other options you can find behind c, if you want to apply some other logic.
My advice is free, and you may get what you paid for.
-
Didi, Thanks for the falsifying visible code. I want to remove it because a few domainupdown controls may not be filled with values at runtime. I want to do away with these controls alone which do not contain any values. Can they be removed ?