|
-
Sep 23rd, 2005, 04:57 PM
#1
[RESOLVED] Run-time control and control array
No idea how to describe this problem, but just add this to a form :
VB Code:
Option Explicit
Dim WithEvents Lst As ListBox
Private Sub Form_Load()
Set Lst = List1(0)
End Sub
List1() is a control array created at design time. Error occurs :
459 - Object or class does not support the set of events
Anyway to avoid it?
Has someone helped you? Then you can Rate their helpful post. 
-
Sep 23rd, 2005, 05:25 PM
#2
Re: Run-time control and control array
You cannot use WithEvents on a control that is part of a control array.
-
Sep 24th, 2005, 08:18 AM
#3
-
Sep 24th, 2005, 11:42 PM
#4
Re: [RESOLVED] Run-time control and control array
Control array elements have their events "hacked" to include an Index property so you know which control fired the event. That hacking can't be (or isn't anyway) done for an object reference. For the same reason, you can't use WithEvents with arrays of object references.
-
Sep 30th, 2005, 04:55 PM
#5
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|