For x As Integer = 1 To CInt(UserInputTextbox.Text)
For Each ctl As Control In Me.Controls '// Loop thru all Controls on Form.
If TypeOf (ctl) Is Panel Then '// Locate Panels.
If ctl.Name = "P" & x.ToString Then
ctl.Enabled = True
Exit For
End If
End If
Next
Next
codeorder
Posting Virtuoso
1,915 posts since Aug 2010
Reputation Points: 255
Solved Threads: 384