Bernard,
Probably is it because you have added your control in another
controlcollection by instance a panel.
Than you can do using your own method
\\\
Dim ctl As Control
For Each ctl In Panel1.Controls
If TypeOf ctl Is TextBox Then
If ctl.Name = sName Then
Return ctl.Handle
End If
End If
Next
///
I advice you however when you dynamicly create controls to set the reference
of those in a kind of array, when you want to do it like this, that you need
to find them by name, than the hashtable can be very effective.
http://msdn.microsoft.com/library/de...classtopic.asp
However this is not the only solution, I use often simple arrays of
controls.
I hope this helps?
Cor