Open folder

  • Thread starter Thread starter J.W. Aldridge
  • Start date Start date
J

J.W. Aldridge

How to write....


Check to see if this folder is already open, if so display.

Otherwise, go to location and open.


T:\Operations\group\J's Daily 8
 
Try code like the following:

Dim FolderName As String
FolderName = "C:\Test"
If Dir(FolderName, vbDirectory) = vbNullString Then
MsgBox "Folder: " & FolderName & " not found"
Else
Shell "explorer.exe " & FolderName, vbNormalFocus
End If

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 
Back
Top