Richard
Mon Feb 26 22:21:07 CST 2007
Alan Gillott wrote:
> This code:
>
> Set oShell = CreateObject("Shell.Application")
>
> set oFolder = oShell.BrowseForFolder(0,"Select
> poem",BIF_BROWSEINCLUDEFILES + 1,5)
>
>
> Gives This Error
> the system cannot find the file specified
>
> Any thoughts???
>
> Works great if I select a folder, dies if I select a file. works OK in
> VB6, fails in VBScript
>
First, you must assign the value &H4000 to BIF_BROWSEINCLUDEFILES. Next, the
shell application provides a wrapper for the shBrowseForFolder API. I a
believe this option allows you to view files in the folders, but does not
allow you to select files. At least, when I use the API I am not able to
select files. I had to use completely different methods to select files.
--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab -
http://www.rlmueller.net
--