Posts: 2
Score: 0
Joined: 11/7/2004
From: USA
Status: offline
Here is a VBS file that creates a version the the "browse for folder" dialog box that will display every folder in all drives, and show every file in any given folder, when that folder is selected.
Res: Looks mighty clean, but I'm a rookie and line 4 that begins Set objFolder gives me a file/path error (like an old basic 75/76 error). Any clues appreciated. Jim
Res: Looks mighty clean, but I'm a rookie and line 4 that begins Set objFolder gives me a file/path error (like an old basic 75/76 error). Any clues appreciated. Jim
remove the Const en fill those in where they belong, that might help, it worked for me too.
Remove the on error resume next and you will see that it is giving you an error. Not really sure why as of yet, but am looking around.
Error line: Set Ret = ShellApp.BrowseForFolder(0, "Choose a file or folder", 16384) Char: 1 Error: Invallid Procedure call or argument Code: 800A0005 Source: Microsoft VBScript runtime error
Sorry for ressurrecting such an old topic, but I was searching for a file browsing hack for vbscript, and this was all I found. So... I dug a bit deeper, even went over to other languages, until I found the following little snippet and figured that I'd post it here just in case someone else could use it - especially since this topic/thread was never successfully answered/solved. NOTE : This works on WinXP, and I think it would work on Windows 2000 - if the .NET framework was installed. Dunno, since I don't have any Win2000 boxen just laying around for testing.
And here's a screenshot of the code in action. As you can see, it is the normal windows "Open File" dialog box.