Panel1.Name = "Panel1"
Select allOpen in new window
For Each x As Control In Me.Controls If x.Name = "staff" & counter Then x.Visible = False End If
Open in new window
, then you can iterate through the controls like:Open in new window