I need to point to a control whose name I won't know until run-time. How do I do it?
My code currently looks a little like this:
========
Dim ctlControl as Control
Dim strName as String
ctlControl = cType(strName, Control)
...now do stuff with/to the control named strname...
========
Now this is clearly rubbish, but it illustrates what I want to do.
Any ideas?
Software/Hardware used:
ASKED:
April 4, 2005 12:16 PM
UPDATED:
June 29, 2005 3:34 PM
Sorry to reply so late!
Try:
.Controls.Add Type:=’type of control’, temporary:=’Boolean’
With .Controls.Count ‘new controls always at end of list
.Caption = “Something useful to you.”
.OnAction = “Some Procedure name”
.Tag = “Some identifier useful to you.”
End With