Article ID: 161056
Article Last Modified on 7/1/2004
Friend Function FormControls() As Object
Set FormControls = ParentControls
'Returns the collection of controls on the parent form.
End Function
Private Sub PropertyPage_SelectionChanged()
Dim UC As UserControl1 'Make sure that UC is typed explicitly as
'the user-defined control you are working
'with. To use Friend functions, you must
'early-bind your variables.
Dim Ctrl As Object
Set UC = SelectedControls(0) 'Return selected control.
For Each Ctrl In UC.FormControls 'Iterate through the use of
'UC's friend function.
Debug.Print Ctrl.Name 'Output the name of each control.
Next Ctrl
End Sub
Additional query words: hidden private Friend Extender kbVBp500 kbVBp600 kbVJ100 kbVBp kbdsd kbDSupport kbActiveX kbControl
Keywords: kbhowto KB161056