alidabiri


Hi everyone.

i have a vb script that is imbeded in an html page (hta). when i use the common dialog flags = cdlOFNAllowMultiselect the file list is present in the filename object and are separated by a space. however when i use dialog flags = cdlOFNAllowMultiselect Or cdlOFNExplorer the files that i selected on the dialog box, are not present in the filename object. the only thing that's there, is the path to the files.

here's the code:

Const cdlOFNAllowMultiselect = 512

Const cdlOFNExplorer = 524288

Set ObjFSO = CreateObject("UserAccounts.CommonDialog")
ObjFSO.Filter = "All Files|*.*"
ObjFSO.FilterIndex = 1
ObjFSO.InitialDir = "c:\"
ObjFSO.Flags = cdlOFNAllowMultiselect or cdlOFNExplorer
InitFSO = ObjFSO.ShowOpen

selected_files = ObjFso.FileName
msgbox selected_files

the variable "selected_files" should have the file names. but it only shows path.

any ideas why this is and how can i get the files names

thanks so much.