Answers inline:
"Viarum" <u48365[ at ]uwe> wrote in message news:8f1a13c769b0f[ at ]uwe...
[Quoted Text] > Is there any way you can access/detect programatically (vba) an associated > label from a textbox?
Yes, through the controls collection for the textbox, which, for a textbox will only ever contain one 'child' control - ie the label, like this
Debug.Print Forms!Form1!Text1.Controls(0)
> I have a similar question for groups. You can group controls in a form and > manipulate them together. > But how can such groups be accessed in vba? I am missing the collections > that > exist e.g. in powerpoint. > Thank you for suggestions!
If you mean group them in design view, then take a look at the InSelection property.
If you mean access them in a loop from VBA at runtime, then its up to you to name them consistently, like:
Textbox1, Textbox2, Textbox3 etc.
Then you can do:
For i = 1 To 3 Debug.Print me.Controls(Textbox" & i).Name Next
|