Re: Controlarray in VBA
- From: "Chirag" <my_email_is@xxxxxxxxxxxxxx>
- Date: Sat, 23 Apr 2005 23:17:37 +0530
You might want to try the following:
1. For all the similar controls, set the index of the control in its Tag
property.
2. Write a function that would have the event handler code and accepts the
index as one of its input parameter.
3. Create event handler for the controls that call function of (2) with the
Tag of the control as input to the function.
While this technique does require a single line event handler - one for each
control, but it comes close to VB control arrays.
- Chirag
PowerShow - View multiple PowerPoint slide shows simultaneously
http://officeone.mvps.org/powershow/powershow.html
"Vera" <Vera@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:924DF2C0-4574-453F-A4F9-83368D4C59BD@xxxxxxxxxxxxxxxx
> Hi there!
>
> I wonder if it is possible to create a controlarray in VBA.
> I have a form with a lot of similar controls that require similar
> handling.
> A controlarray with indexed event-handlers would be ideal in a situation
> like this.
>
> Is this possible? If so, how? If not, then what can I do to avoid getting
> about a hundred similar event-handlers?
>
> Any help will be greatly appreciated.
> Thanx!
>
> Vera
>
.
- References:
- Controlarray in VBA
- From: Vera
- Controlarray in VBA
- Prev by Date: Controlarray in VBA
- Next by Date: Formatting Userforms fields
- Previous by thread: Controlarray in VBA
- Next by thread: Re: Controlarray in VBA
- Index(es):
Relevant Pages
|