I wrote a function that loops through all the controls of a form, so that I could set some of the properties of all those that belong to a certain container.

This is a small version of that function:

VB Code:
  1. Public Sub setControls(ByVal formulary As Form, ByVal prefix As String, text As String)
  2.     prefix = UCase(prefix)
  3.     Dim control As control
  4.    
  5.     For Each control In formulary.Controls
  6.         If InStr(1, UCase(control.Container.Name), prefix) > 0 Then
  7.             If TypeName(control) = "TextBox" Then
  8.                 control.text = text
  9.             End If
  10.         End If
  11.     Next
  12. End Sub
When I call the function
VB Code:
  1. Call setControls(Me, "Frame", "Hi")
it sets every textbox text to "Hi" in all containers whose name starts on "Frame". BUT (cause there is a but) in the case of a SSTab control it's different, because I can't change the properties of the members of just ONE specific tab since the container is the SSTab control and not something like SSTab(1).

The thing is: is there any way to know is a control belongs to a specific tab in a SSTab control?