MartyConnelly
martyconnelly at shaw.ca
Mon May 30 15:01:01 CDT 2005
There is also this method, using Shell.Application, it allows creation
of folders
but you can't back up beyond the initial opened folder, I suppose useful
if you don't want some
investigating a shared folder. There are a boatload of other little uses
of this object.
like minimizing all open screens or opening a specific desktop control panel
'http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/objects/shell/browseforfolder.asp
'SHDOC401.DLL for IE5
Function fnShellBrowseForFolderWindows()
Dim objShell
Dim ssfWINDOWS
Dim objFolder
ssfWINDOWS = 36
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.BrowseForFolder(0, "Example Select
Folder", 0, ssfWINDOWS)
If (Not objFolder Is Nothing) Then
'Add code here.
Debug.Print objFolder.Title
Debug.Print
objFolder.ParentFolder.ParseName(objFolder.Title).Path
End If
Set objFolder = Nothing
Set objShell = Nothing
End Function
'http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/objects/shell/browseforfolder.asp
'SHDOC401.DLL for IE5
'?fnShellBrowseForFolder("c:\access files")
Function fnShellBrowseForFolder(strRootPath)
Dim objShell
Dim ssfWINDOWS
Dim objFolder
ssfWINDOWS = 36
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.BrowseForFolder(0, "Example Select
Folder", 0, strRootPath)
If (Not objFolder Is Nothing) Then
'Add code here.
Debug.Print objFolder.Title
Debug.Print
objFolder.ParentFolder.ParseName(objFolder.Title).Path
End If
Set objFolder = Nothing
Set objShell = Nothing
End Function
Function fnShellFindFilesVB()
Dim objShell
Set objShell = CreateObject("Shell.Application")
objShell.FindFiles
Set objShell = Nothing
End Function
Function fnShellOpenVB()
Dim objShell
Set objShell = CreateObject("Shell.Application")
objShell.Open ("C:\")
Set objShell = Nothing
End Function
Function fnShellExploreJ()
Dim objShell
Set objShell = CreateObject("Shell.Application")
objShell.Explore ("C:\")
Set objShell = Nothing
End Function
Function fnShellExploreVB()
Dim objShell
Dim ssfWINDOWS
ssfWINDOWS = 36
Set objShell = CreateObject("Shell.Application")
objShell.Explore (ssfWINDOWS)
Set objShell = Nothing
End Function
Stuart McLachlan wrote:
>On 30 May 2005 at 8:07, John W. Colby wrote:
>
>
>>This displays a different dialog with a "make new folder" button on it.
>>
>>
>>
>
>Great, I was still looking when you found it. I'll definitely update my
>bits and pieces store 'Useful.MDB" to include this one.
>
>
>
>
>
--
Marty Connelly
Victoria, B.C.
Canada