Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Saving Excel 2007 file in 2003 creates very large file | Excel Discussion (Misc queries) | |||
Confused here Prevent Saving File - but allow ONLY File SAVEAS Met | Excel Discussion (Misc queries) | |||
Excel should let me sort the file directory when saving a file | Excel Discussion (Misc queries) | |||
How do I stop Excel 2000 from saving file history from file that . | Excel Discussion (Misc queries) | |||
saving an excel file as an ASCII text file without delimiters | Excel Programming |