I have created various controls by code and added them to a form.
I need for some of them (TextBox) to modify the value.
I use the folowing code to obtain the TextBox wich name is given by sName.
But Me.Controls does not contains my TextBoxes but only the controls
implemented by hand.
This is also confirmed by the spy window.
Thanks for the help.
Dim ctl As Control
For Each ctl In Me.Controls
If TypeOf ctl Is TextBox Then
If ctl.Name = sName Then
Return ctl.Handle
End If
End If
Next
--
Bernard Bourée
be*****@bouree.net