Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Saving a file

Dear All,

Programtically a Workbook is opened as read only from a
shared directory. How can I enure that when a user tries
to press save, the directory where the file was opened is
not the directory that Excel tries to save the file, but
one of my choice?

Chdir does not work. I could customise the Excel Workbook
or make the shared directory read only, but is there an
easier way?

Alastair

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Saving a file

"Alastair MacFarlane" wrote in message
...
Programtically a Workbook is opened as read only from a
shared directory. How can I enure that when a user tries
to press save, the directory where the file was opened is
not the directory that Excel tries to save the file, but
one of my choice?

Chdir does not work. I could customise the Excel Workbook
or make the shared directory read only, but is there an
easier way?


Hi Alastair,

Modifying the workbook or making the directory read-only are your only
options. Can you explain exactly what you mean by "ChDir does not work." If
you are trying to change the current directory to a different drive then you
must use ChDrive first to change the drive before using ChDir to change the
directory. I think the best place to put the code required to change the
current directory before the workbook is saved would be the
Workbook_BeforeClose event procedure.

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Saving a file

Rob,

Thanks for your quick reply. Your comments were much as I
had expected, although I didn't know that ChDrive had to
proceed Chdir to achieve the results I wanted to achieve.
I think my best option is to change the code of the save
toolbar and File, Save/Save As to change the drive and
diectory.

Once again thanks again...

Alastair

-----Original Message-----
"Alastair MacFarlane"

wrote in message
...
Programtically a Workbook is opened as read only from a
shared directory. How can I enure that when a user tries
to press save, the directory where the file was opened

is
not the directory that Excel tries to save the file, but
one of my choice?

Chdir does not work. I could customise the Excel

Workbook
or make the shared directory read only, but is there an
easier way?


Hi Alastair,

Modifying the workbook or making the directory read-

only are your only
options. Can you explain exactly what you mean by "ChDir

does not work." If
you are trying to change the current directory to a

different drive then you
must use ChDrive first to change the drive before using

ChDir to change the
directory. I think the best place to put the code

required to change the
current directory before the workbook is saved would be

the
Workbook_BeforeClose event procedure.

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm


.

Reply
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
Saving Excel 2007 file in 2003 creates very large file Jon Pearce Excel Discussion (Misc queries) 2 July 16th 09 07:20 PM
Confused here Prevent Saving File - but allow ONLY File SAVEAS Met JMay Excel Discussion (Misc queries) 2 June 17th 07 04:37 PM
Excel should let me sort the file directory when saving a file Beanee70 Excel Discussion (Misc queries) 0 March 14th 06 07:03 AM
How do I stop Excel 2000 from saving file history from file that . Cathy Excel Discussion (Misc queries) 0 March 29th 05 03:27 PM
saving an excel file as an ASCII text file without delimiters Sewellst Excel Programming 4 January 7th 05 01:41 PM


All times are GMT +1. The time now is 10:53 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"