Shell.Explore method

Opens a specified folder in a Windows Explorer window.

Syntax


Shell.Explore(
  vDir
)

Parameters

vDir [in]

Type: Variant

The folder to be displayed. This can be a string that specifies the path of the folder or one of the ShellSpecialFolderConstants values. Note that the constant names found in ShellSpecialFolderConstants are available in Visual Basic, but not in VBScript or JScript. In those cases, the numeric values must be used in their place.

Return value

JScript

This method does not return a value.

VB

This method does not return a value.

Examples

The following example shows Explore in use. Proper usage is shown for JScript, VBScript, and Visual Basic.

JScript:


<script language="JScript">
    function fnShellExploreJ()
    {
        var objShell = new ActiveXObject("shell.application");
        
        objShell.Explore("C:\\");
    }
</script>]]>


VBScript:


<script language="VBScript">
    function fnShellExploreVB()
        dim objShell
        dim ssfWINDOWS
        ssfWINDOWS = 36

        set objShell = CreateObject("shell.application")
        objShell.Explore(ssfWINDOWS)

        set objShell = nothing
    end function
 </script>


Visual Basic:


Private Sub fnShellExploreVB()
    Dim objShell As Shell

    Set objShell = New Shell
    objShell.Explore (ssfPERSONAL)

    Set objShell = Nothing
End Sub


Requirements

Minimum supported client

Windows 2000 Professional, Windows XP [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Shldisp.h

IDL

Shldisp.idl

DLL

Shell32.dll (version 4.71 or later)

 

 

Show: