Quantcast
Channel: Excel IT Pro Discussions forum
Viewing all articles
Browse latest Browse all 11829

How to Change Current Directory to a Network Drive in VBA

$
0
0

Excel 2010.  VBA.

In my code I prompt the user to select a file to open.  The file browser opens to the current directory.  I want to change the current directory to a network location (\\gnfinance\finance\payroll stubs) before I prompt for a file, so the browser opens in the directory where the files are located.  However, when I use:

ChDir "\\gnfinance\finance\payroll stubs"

to try to change the current directory, it does not take (the current directory value remains unchanged).  How can I change the current directory to a network location such as the one mentioned above?  Thanks for the help.


Doug Pruiett Good News Jail & Prison Ministry Richmond, Virginia www.goodnewsjail.org



Viewing all articles
Browse latest Browse all 11829

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>