I'm trying to iterate through the controls on a form and set the tabIndex to 0 for all labels. I copped the following code from google but it doesn't work for me and I'm pretty certain it's because all of my controls are on a panel and not on the form. Does anyone know how I can modify this code to work if the controls are on a panel. I've tried lots of things with no success.
Private Sub setControls() Dim cControl as control For each cControl in me.controls If (Typeof cControl is Label) then cControl.tabIndex = 0 end if next cControl end sub