Is it possible to cycle through the controls in a container (frame or picture box) on a given form? I know that the following code cycles through all controls on that form... but does not limit itself to the controls in that container.
Overview: Place a picture box on the form and place a few text boxes in it. As well as that, place a few text boxes just on the form. Add a button and in the click event place the following code -
Then add this code:
Public Sub clear_boxes(box As Object)
Dim myobj As Object
For Each myobj In box.Container
'..I know this gives the form, and not the container but???
If TypeOf myobj Is TextBox Then
myobj.Text = ""