ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Open folder (https://www.excelbanter.com/excel-programming/428647-open-folder.html)

J.W. Aldridge

Open folder
 
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

Chip Pearson

Open folder
 
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)



On Mon, 18 May 2009 14:21:06 -0700 (PDT), "J.W. Aldridge"
wrote:

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


J.W. Aldridge

Open folder
 
perfect....

thanx!



All times are GMT +1. The time now is 02:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com