Opening Multiple Workbooks

M

MISMitch

I am new to VBA.
I am trying to open Multiple Workbooks that reside on a networked server.
The first book opens and my macro stops.
I do not have a problem when opening multiple books on my local C drive.

My code looks like below:

ChDir "Q:\MIS\ICSS\ICSSreports"
Workbooks.Open Filename:= _
"Q:\MIS\ICSS\ICSSreports\CSCMthly.xls"
Workbooks.Open Filename:= _
"Q:\MIS\ICSS\ICSSreports\CSCMnthly1.xls"

Any suggestions for problem isolation would be appreciated.
Mitch
 
J

John Wilson

Mitch,

The ChDir as you have it coded will not change the default drive.
If you're running this from the C: drive on your pc, it's quite possible
that you have a file named CSCMthly.xls on that drive but you don't
have CSCMthly1.xls

Anyway, to change the drive, use the following:
ChDrive = "Q"

John
 

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

Top