IShellDispatch.Explore method

Opens a specified folder in a Windows Explorer window.

Syntax

IShellDispatch.Explore(
  vDir
)

IShellDispatch.Explore( _
  ByVal vDir As Variant _
)

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.

Remarks

This method is implemented and accessed through the Shell.Explore method.

Examples

The following examples show the use of Explore in 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

Requirement Value
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)