Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleOpen Windows Explorer to display files in a specific directory in Visual Basic 6
DescriptionThis example shows how to open Windows Explorer to display files in a specific directory in Visual Basic 6.
KeywordsWindows Explorer, shell, open, files, Visual Basic 6
CategoriesFiles 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)
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated