You can't access a control array from the Forms Control collection. You can get the controls atributes for example Name,BackColor,Text etc...
VB Code:
Dim xx As Control For Each xx In Me.Controls If TypeOf xx Is TextBox Then MsgBox xx.Name MsgBox xx.Text MsgBox xx.BackColor End If Next
but you can't access that controls collection properties such as xx.ubound or xx.count etc... which means you can't load another control.
For instance this won't work
VB Code:
Dim xx As Control For Each xx In Me.Controls If TypeOf xx Is TextBox Then Load xx.Name(1) End If Next
Even though it is saying Load Text1(1) it still won;t work because you are looping thru the Forms control array and not the controls array itself.
Atleast that's what I think!I could be totaly wrong!




I could be totaly wrong!

Reply With Quote