View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
unnameable unnameable is offline
external usenet poster
 
Posts: 1
Default changing current directory to that of the current open file

Hi,

I'm working on an invoicing project which involves three seperat
spreadsheet files. The main file opens the other two via a macro.

My problem is, I can't find a way to make the current directory (usin
ChDir or the like) the directory in which the main file is present!

I know it probably would be alright if I opened the main file usin
FileOpen in the Excel menu, but I would like it to work if the file i
opened direct by double clicking on it in windows explorer.

Say the file is C:\Invoicing\OrderForm.xls ... how would I make th
current directory C:\Invoicing via a macro without actually naming th
directory? I don't want it to be a permanent thing, I only want it t
happen when the spreadsheet is opened.

Any ideas

--
Message posted from http://www.ExcelForum.com