赋值问题
怎样将一组mp3文件赋值给一个数组啊?
关键是mp3文件是在路径下,我不太会用有关路径的赋值
假设有4个mp3文件的路径为:D:\music 下面,怎样处理啊?
请附上详细程序,谢谢了哦!
在窗体中添加一个通用对话框...一个按扭..编写如下事件...
Option Explicit
Private Sub Command1_Click()
Dim FileNames() As String
Dim i As Integer
With CommonDialog1
.Filter = "mp3 file(*.mp3)|*.mp3"
.DialogTitle = "选择多个文件例程"
.DefaultExt = "*.mp3"
.Flags = cdlOFNAllowMultiselect
.ShowOpen
If .FileName <> "" Then
FileNames() = Split(.FileName, " ", -1)
End If
End With
For i = 1 To UBound(FileNames)
Print FileNames(i)
Next
End Sub