• Log in or sign up for an account here: https://www.sythe.org/login

How do I fix this?

Status
Not open for further replies.

NameGuy

Guru

Banned
Joined
Jul 22, 2012
Sythe Gold
0
Messages
1,007
Location
Canada
So I'm making this music player
[YOUTUBE]rN2Z-6Z4HNE[/YOUTUBE]
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?
 
For eatch track as string in open.filenames -- "Eatch" isn't "each"
 
Status
Not open for further replies.
Runescape Gamblingrunescape gambling
Back
Top