获得的字符串是以chr(0)为分隔符的。可以用split(filename,chr(0))来获得文件名数组
CD.Flags = cdlOFNAllowMultiselect Or cdlOFNExplorer
CD.Filter = "(*.JPG)|*.JPG|(*.Bmp)|*.Bmp|(*.Gif)|*.Gif"
CD.FileName = ""
CD.ShowOpen
If CD.FileName = "" Then Exit Sub
MsgBox CD.FileName
If InStr(1, CD.FileName, Chr(0)) = 0 Then
Print "只选择了一个文件!"
lstPic1.AddItem CD.FileName
Else
Print "选择了多个文件!"
temp = Split(CD.FileName, Chr(0))
For i = 1 To UBound(temp)
lstPic1.AddItem temp(0) & "\" & temp(i)
Next
End If