R
RobW
I have a control on a form that I want to access with its index number (the
controls are various). Without enumerating how do I get that index number
(the 179 in the code below)? and
why does this code throw an error when the variable ctl is set (says object
required)
Sub Test1()
Dim frm As Form, ctl As Control
Set frm = Forms![suchandsuch]
Set ctl = frm.Controls.Item(179).Name
End Sub
controls are various). Without enumerating how do I get that index number
(the 179 in the code below)? and
why does this code throw an error when the variable ctl is set (says object
required)
Sub Test1()
Dim frm As Form, ctl As Control
Set frm = Forms![suchandsuch]
Set ctl = frm.Controls.Item(179).Name
End Sub