Click to See Complete Forum and Search --> : How can I use Withevents as Array


Alex999H
January 16th, 2000, 11:30 AM
Hello,

Can I use Withevents as an array like this:

Dim withevents Button(1 to 10) as CommandButton 'this code doesn't work



Alexander Holtkamp

Satya
January 16th, 2000, 06:45 PM
Hi!
I think dimension is not possible for withevents because it is used for object variables in the class events.Keyword that specifies that varname is anobject variable used to respond to events triggered by anActiveX object. WithEvents is valid only inclass modules. You can declare as many individual variables as you like using WithEvents, but you can't createarrays with WithEvents. You can't use New with WithEvents.

satya