Private Sub File1_Click() (<.....It usally highlights that)
File1.Pattern = ("*.wmv;*.mp3;*.wma;*")
Else: without
File1.Pattern = ("*.*")
End If

If Right(File1.Path, 1) <> "\" Then
FileName = File1.Path + "\" + File1.FileName
Else
FileName = File1.Path + File1.FileName
End If

End Sub

The Error is Runtime 424 Object Required and i cant seem to get the code to make it work right can any one help?? ;) <It usually says "Object Required">


I'm trying to get Windows media player to play the files that i select. Ive tryed googleing it but can't get any thing plz help with both.Like wma and mp3 and video files but cant get it to work.

I don't know if this answer, but I'm not seeing an if statement in there. Just an else, and an end if.

I have window media player in the program to and when i click a file for it to play it gives me that error. I am trying to get it were when i click on a Audio or Video file it plays it but when i run it it just give me that error.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.