Are control arrays possible in VBA?

Can visual objects be created dynamically in VBA?
In VB it can be done by creating a visual object and assigning it an index, and then using:
Load ObjectName(2)
to bring it into existence.

Does any know a way to do such a thing in VBA?

Comments

  • : Can visual objects be created dynamically in VBA?
    : In VB it can be done by creating a visual object and assigning it an index, and then using:
    : Load ObjectName(2)
    : to bring it into existence.
    :
    : Does any know a way to do such a thing in VBA?
    :
    Giraffe here, VB novice.
    I don't think you can have control arrays in VBA. I've been trying to create them in VBA on Excel 97, by simply copying and pasting. If a try this in VB version 6 , the message "You already have a control named XXXXX. Do you want to create a Control Array?" appears.

    However, Try this on VBA in Excel 97 and this message does not appear, neither does it let you change the name of the new control to match the first control. If I try, VBA says "could not set the name property. Ambiguous name"

    Did you ever get to the bottom of this?






  • : : Can visual objects be created dynamically in VBA?
    : : In VB it can be done by creating a visual object and assigning it an index, and then using:
    : : Load ObjectName(2)
    : : to bring it into existence.
    : :
    : : Does any know a way to do such a thing in VBA?
    : :
    : Giraffe here, VB novice.
    : I don't think you can have control arrays in VBA. I've been trying to create them in VBA on Excel 97, by simply copying and pasting. If a try this in VB version 6 , the message "You already have a control named XXXXX. Do you want to create a Control Array?" appears.
    :
    : However, Try this on VBA in Excel 97 and this message does not appear, neither does it let you change the name of the new control to match the first control. If I try, VBA says "could not set the name property. Ambiguous name"
    :
    : Did you ever get to the bottom of this?
    :

    Does the control have an Index property? If so set it to 0!


    Greets...
    Richard

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories