|
|
Title | Open Windows Explorer to display files in a specific directory in Visual Basic 6 |
Description | This example shows how to open Windows Explorer to display files in a specific directory in Visual Basic 6. |
Keywords | Windows Explorer, shell, open, files, Visual Basic 6 |
Categories | Files and Directories |
|
|
When you click the program's button, it builds a string of the form:
explorer.exe /e, C:\somedir\subdir
and executes this command with Shell.
|
|
Const QUOTE As String = """"
Dim path As String = txtPath.Text.Replace(QUOTE, QUOTE & _
QUOTE)
Shell("explorer.exe /e, " & path, vbNormalFocus)
|
|
|
|
|
|