|
-
June 14th, 2001, 12:53 PM
#1
collections
Does anyone know what changes I need to make to the code below so that it does not give me an error that says "For each control variable must be Variant or Object. Thank you for your help.
Dim myColl As New Collection
Private Sub cmdAdd_Click()
If Len(txtInput) > 0 Then
myColl.Add txtInput
txtInput = ""
End If
End Sub
Private Sub cmdDisplay_Click()
Dim item As String
lstOutput.Clear
For Each item In myColl
lstOutput.AddItem item
Next item
End Sub
Private Sub Form_Load()
Set myColl = New Collection
End Sub
Archie Kantzavelos
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
|