Workbooks.Open with a network path

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

Hello

I'm trying to do a Set SrcWrkBook = Workbooks.Open(\\networkdrive\ folder
one\ folder two\filename.XLS, True, True)

I assume the white spaces and perhaps the \\ are giving me issues. How do
I get around this?
 
That first argument (your path and filename) needs to be a String value, so
it needs quote marks around it. Also, I'd be willing to bet that there are
no leading spaces in front of your folder names. My guess is your line
should look like this (note, this line is long, so I expect it will word
wrap at a required blank space)...

Set SrcWrkBook = Workbooks.Open("\\networkdrive\folder one\folder
two\filename.XLS", True, True)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top