@Hiroshe sorry, it does seem like the best way but it's just the example seemed a bit long. Do you have any code you could share with me to do with the pinging all ip addresses on a network or a packet sniffer? Thanks anyway
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...