LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default changing current directory to that of the current open file

May be,
chdir cstr(activeworkbook.path)
Cecil

"unnameable " wrote in message
...
Hi,

I'm working on an invoicing project which involves three seperate
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 (using
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 using
FileOpen in the Excel menu, but I would like it to work if the file is
opened direct by double clicking on it in windows explorer.

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

Any ideas?


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



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
open file in current directory Tomo Excel Worksheet Functions 1 January 12th 08 12:04 AM
open file in current directory Tomo Excel Discussion (Misc queries) 1 January 11th 08 11:48 PM
Macro to play wave file in current directory yo beee Excel Programming 2 May 3rd 04 09:15 AM
Use Current directory to store file Paul Moles[_2_] Excel Programming 1 November 26th 03 03:04 PM
OPENING A FILE LOCATED IN A DIRECTORY DIFFERENT FROM CURRENT DIRECTORS Steven R. Berke Excel Programming 1 July 25th 03 04:49 PM


All times are GMT +1. The time now is 03:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"