Results 1 to 2 of 2

Thread: help

  1. #1
    vandana Guest

    Default help

    The following code doesnt work.. Pops an error when I use X(y). Can somebody help me please <BR><BR>Thanks much!! <BR>vandana <BR><BR>Private Sub Command1_Click() <BR>Dim X As New Collection <BR>X.Add "asdf", "asdfa" <BR>X.Add "asdf1", "asdfa1" <BR>X.Add "asdf2", "asdfa2" <BR>For Each y In X <BR> MsgBox X(y) <BR>Next <BR><BR>End Sub

  2. #2
    Shashiraj P Shetty Guest

    Default RE: help

    Replace your code with this code. It will definitely work !!<BR><BR>Private Sub Command1_Click()<BR>Dim X As New Collection<BR><BR>X.Add "asdf"<BR>X.Add "asdf1"<BR>X.Add "asdf2"<BR>For Each y In X<BR> <BR> MsgBox y<BR>Next<BR>End Sub<BR><BR><BR>Regards,<BR>Shashi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts