How do I fix this?

Discussion in 'Programming General' started by NameGuy, Oct 25, 2012.

Thread Status:
Not open for further replies.
How do I fix this?
  1. Unread #1 - Oct 25, 2012 at 7:31 PM
  2. NameGuy
    Joined:
    Jul 22, 2012
    Posts:
    1,007
    Referrals:
    1
    Sythe Gold:
    0

    NameGuy Guru
    Banned

    How do I fix this?

    So I'm making this music player

    http://www.youtube.com/watch?annota...&feature=iv&src_vid=Uwce8DekoPE&v=rN2Z-6Z4HNE
    --
    But I get the "Syntax error" on this line of code:
    Code:
        Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
            Dim open As New OpenFileDialog
            Try
                open.Title = "open music"
                open.FileName = ""
                open.Multiselect = True
                open.Filter = "Mp3 files (*.mp3)|*.mp3|All files (*.*)(*.*"
                If open.ShowDialog = Windows.Forms.DialogResult.OK Then
                    For eatch track as string in open.filenames
                        ListBox1.Items.Add(Track)
                    Next
                    For Each trackname As String In open.FileNames
                        ListBox2.Items.Add(trackname)
                    Next
                End If
            Catch ex As Exception
            End Try
        End Sub
    http://gyazo.com/ed00920b077bb00fd900b04ba257d87b

    I all so get the "Name Track is not declared" On this:

    Code:
        Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
            Dim open As New OpenFileDialog
            Try
                open.Title = "open music"
                open.FileName = ""
                open.Multiselect = True
                open.Filter = "Mp3 files (*.mp3)|*.mp3|All files (*.*)(*.*"
                If open.ShowDialog = Windows.Forms.DialogResult.OK Then
                    For eatch track as string in open.filenames
                        ListBox1.Items.Add(Track)
                    Next
                    For Each trackname As String In open.FileNames
                        ListBox2.Items.Add(trackname)
                    Next
                End If
            Catch ex As Exception
            End Try
        End Sub
    http://gyazo.com/8e9cd1df42162a7aefcbd2cff7137e13

    Any one know how I can fix this?
     
  3. Unread #2 - Oct 25, 2012 at 11:20 PM
  4. Raid500
    Joined:
    Feb 11, 2007
    Posts:
    592
    Referrals:
    1
    Sythe Gold:
    0

    Raid500 Forum Addict

    How do I fix this?

    For eatch track as string in open.filenames -- "Eatch" isn't "each"
     
  5. Unread #3 - Oct 26, 2012 at 5:44 PM
  6. NameGuy
    Joined:
    Jul 22, 2012
    Posts:
    1,007
    Referrals:
    1
    Sythe Gold:
    0

    NameGuy Guru
    Banned

    How do I fix this?

    tyvm! =p
     
< Looking for Java Help. Easy | Programing/Coding websites >

Users viewing this thread
1 guest
Thread Status:
Not open for further replies.


 
 
Adblock breaks this site