I'm afraid the term 'Visual Basic' or 'VB' can mean so many different things
these days that it has become, for most practical purposes, meaningless. Do
you mean VBA, or 'classic' VB (e.g. VB6 or earlier) or VB.NET?
If you mean VBA, then the only method I know is to walk the collections. See
the example below. If you mean VB 'classic' or VB.NET then, as you have been
advised elsewhere in this thread, you may get a more definitive answer in a
more appropriate newsgroup.
Private Sub Command4_Click()
Dim ctl As Control
Dim prp As Property
Dim boolFound As Boolean
For Each ctl In Me.Controls
For Each prp In ctl.Properties
If prp.Name = "TabIndex" Then
If prp.Value = 1 Then
MsgBox "The control with TabIndex 1 is: " & ctl.Name
boolFound = True
Exit For
End If
End If
Next prp
If boolFound Then
Exit For
End If
Next ctl
End Sub