Public Const OFN_ALLOWMULTISELECT = &H200
Public Const OFN_EXPLORER = &H80000    
CDialog.flags = OFN_ALLOWMULTISELECT + OFN_EXPLORER
这样就可以了,但是你要自己分析,返回的字符串。
格式是:path+chr(0) +filename1+chr(0)+filename2+chr(0)+......

解决方案 »

  1.   

    用CommonDialog控件选择文件后,其Filename就是路径名加上文件名,文件名之间用空格格开
    比如 选中了 C:\temp\tem1.txt      C:\temp\tem2.txt        C:\temp\tem3.txt C:\temp\tem4.txt            C:\temp\tem5.txt 这5个文件,filename就是c:\temp\tem1.txt tem2.txt tem3.txt tem4.txt tem5.txt
    要想将这些文件名分开应该很简单了!
      

  2.   

    控件的属性要设置一下:
    With CommonDialog1
            .CancelError = True
            .MaxFileSize = 32767 '被打开的文件名尺寸设置为最大,即32K
            .Flags = cdlOFNHideReadOnly Or cdlOFNAllowMultiselect Or cdlOFNExplorer Or cdlOFNNoDereferenceLinks
    end with