View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Changing to different drive and directory

Do both

ChDrive "H"
ChDir "H:\Accounting\Journals"


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Rob" <none wrote in message ...
Hi,

I'm trying to run some code and part of that is to change to a particular
drive, directory and folder. Namely:
ChDir "H:\Accounting\Journals"

However, I find that the excel code ignores this instruction and saves the
text file (created via the code) to whatever directory I may have opened
last.

As I am on a network, is there something else that needs to be included in
the code to force Excel to go to the correct drive, etc.?

Rob