ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using Network folders (https://www.excelbanter.com/excel-programming/276498-re-using-network-folders.html)

Jim Rech

Using Network folders
 
Try using this Windows API function:

Declare Function SetCurrentDirectoryA Lib "kernel32" (ByVal lpPathName As
String) As Long

Sub SetDir(PathStr as String)
SetCurrentDirectoryA PathStr
End Sub

Just call SetDir with the path you want:

SetDir \\Whatever\...

Put the declaration at the top of the module.

--
Jim Rech
Excel MVP




All times are GMT +1. The time now is 01:29 PM.

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