Dim PControl As Object
Dim MyControl As Control Dim AControl As Object 'Rif. all'UserControl For Each AControl In ParentControls If AControl.Name = Ambient.DisplayName Then Set MyControl = AControl Exit For End If Next 'Rif. al Form in cui e' l'UserControl Set PControl = ParentControls.Item(1).Parent While Not (TypeOf PControl Is Form) Set PControl = PControl.Parent Wend |