Yes because vba doesn't see them as array elements, just fields that you
added to the window and then added to vba. Also, we can't name them
"XYZ(1)" because that isn't a valid object name in vba so the parens are
Note also that the name is based on the order added also, so if you'd select
XYZ3 then 2 then 1 your fields would be named "wrong" in vba as they would
be backwards. Again, because it's based off the field name (and not array)
and so each field gets the name XYZ and then 1,2,3 etc to be unique.
mbs dev support
This posting is provided "AS IS" with no warranties, and confers no rights.
"HFLo" <HFLo@discussions.microsoft.com> wrote in message
> it works, but when I add those fields to VBA, it is referenced as XYZ,
> XYZ2 etc and not XYZ(1), XYZ(2), XYZ(3)?
> thks for your advice.
> "Habeeb" wrote:
> > Hi HFLO,
> > Open modifier and select gp or 3rd party and then select exisiting
> > form or select new form and then open window layout. From the Toolbox
> > local fields in drop-down and press the new button and then enter field
> > and enter the array size for e.g. 3 and then select the datatype string
> > text and press OK button. Toolbox will show the newly created the array
> > field, select that arrayfield and drag and dropped onto the layout 3
> > Hence ur array field would be there on ur form.
> > Hope it will help to u.
> > --
> > Developer
> > "HFLo" wrote:
> > > How to use Modifier to add an array fields of 3 elements on a form?
> > >
> > > thks in advance.