View Single Post
Old 08-08-2008   #3 (permalink)
Reventlov


 
 

Re: Select multiple files in dialog box

Il giorno Fri, 8 Aug 2008 23:19:20 +0200, "Pegasus \(MVP\)" <I.can@xxxxxx> ha scritto:
Quote:

>
>"Reventlov" <noone@xxxxxx> wrote in message
Quote:

>> Is there a way to ask the user for multiple existing files?
>
>Have a look here:
>How Can I Show Users a Dialog Box for Selecting Files?
>http://www.microsoft.com/technet/scr...5/hey0301.mspx
>
Thanks a lot.
I ignored the existence of UserAccounts. The syntax is similar to msComDlg (but it is
InitialDir instead of InitDir). I will try other flags to see if I can show the window in
win95 style.

Set objDialog = CreateObject("UserAccounts.CommonDialog")
objDialog.Filter = "VBScript Scripts|*.vbs|All Files|*.*"
objDialog.Flags = &H0200
objDialog.FilterIndex = 1
objDialog.InitialDir = "C:\Scripts"
intResult = objDialog.ShowOpen

If intResult = 0 Then
Wscript.Quit
Else
Wscript.Echo objDialog.FileName
End If



--
Giovanni Cenati (Bergamo, Italy)
Write to "Reventlov" at katamail com
http://digilander.libero.it/Cenati (Esempi e programmi in VbScript)
--
My System SpecsSystem Spec