-
I have been trying to figure this out, but have failed. I want to make an event so when the user clicks a command button, an OPEN DIALOG BOX OPENS. I have figured how to do that. But what i want to know is how do I filter the types of files that appear in the Open Dialog Box? Lets say I want the types of files to appear are .mp3, .rm, .au, and .wav. I understand how to filter one type, but what if i wanted all those other file types too?
This is my code currently:
(The cdbOpen is the common dialog box control)
-------------START OF CODE---------------
Dim strFilePath As String
cdbOpen.DialogTitle = "Open File"
cdbOpen.Filter = "*.mp3"
cdbOpen.FileName = "*.mp3"
cdbOpen.ShowOpen
strFilePath = cdbOpen.FileName
-------------END OF CODE------------------
Please Help!! Please also modify this code and tell me, or if this code isn't right, then write another other please. I will appreciate it, thanks in advance.
-
Seperate them with a semi colon (;)
Code:
cdbOpen.Filter = "*.mp3;*.rm;*.au;*.wav"
-
More Detailed...
Heres A More Detailed Way:
<----------------Code----------------->
cdbOpen.DialogTitle = "Open File"
cdbOpen.Filter = "All Sound Files|*.mp3;*.au;*.wav;*.ra|"
cdbOpen.FileName = "MP3(*.mp3)|*.mp3"
cdbOpen.ShowOpen