Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 54
Default Saving to root directory

I have a workbook that consists of 2 worksheets, after the data is entered
the 2 sheets are separate and saved into a folder with the the 2 sheets as
individual files. This all works fine if I specify the saving location, what
I would like to know is how to automatically save the the new folder and
files into the root directory of the device the original workbook was
started. The workbook runs on several portable usb devices so the starting
location can vary from device to device. The name of the parent folder that
the new folders and files are saved to is constant. ie: ??:\Sheets\??????.
Thank you
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 94
Default Saving to root directory

I was thinking that you could use the workbook open event to copy the
file location o a cell on your spreadsheet and then use
woorkbook.saveas pointed to this cell to save back to that location.

you might need to play around with the string printed into [A1]

just an idea.

let me know if this is plausible

http://www.excel-ant.co.uk



Private Sub Workbook_Open()
Sheets("1").Range("A1") = ActiveWorkbook.FullName
End Sub
ChrisP wrote:
I have a workbook that consists of 2 worksheets, after the data is entered
the 2 sheets are separate and saved into a folder with the the 2 sheets as
individual files. This all works fine if I specify the saving location, what
I would like to know is how to automatically save the the new folder and
files into the root directory of the device the original workbook was
started. The workbook runs on several portable usb devices so the starting
location can vary from device to device. The name of the parent folder that
the new folders and files are saved to is constant. ie: ??:\Sheets\??????.
Thank you


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 54
Default Saving to root directory

Thank you - I can follow what you mean, just unsure how I would do this. Thanks

"somethinglikeant" wrote:

I was thinking that you could use the workbook open event to copy the
file location o a cell on your spreadsheet and then use
woorkbook.saveas pointed to this cell to save back to that location.

you might need to play around with the string printed into [A1]

just an idea.

let me know if this is plausible

http://www.excel-ant.co.uk



Private Sub Workbook_Open()
Sheets("1").Range("A1") = ActiveWorkbook.FullName
End Sub
ChrisP wrote:
I have a workbook that consists of 2 worksheets, after the data is entered
the 2 sheets are separate and saved into a folder with the the 2 sheets as
individual files. This all works fine if I specify the saving location, what
I would like to know is how to automatically save the the new folder and
files into the root directory of the device the original workbook was
started. The workbook runs on several portable usb devices so the starting
location can vary from device to device. The name of the parent folder that
the new folders and files are saved to is constant. ie: ??:\Sheets\??????.
Thank you



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
Problems saving a worksheet with links Excel Discussion (Misc queries) 1 July 7th 06 04:49 PM
Why is Word, Excel saving a backup copy in my temp directory? daddyribs Excel Discussion (Misc queries) 1 April 19th 06 04:24 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
Saving to "open" directory 9119 New Users to Excel 2 January 19th 06 02:39 PM
Saving into new directory Greg B Excel Discussion (Misc queries) 2 March 2nd 05 03:58 PM


All times are GMT +1. The time now is 12:11 PM.

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

About Us

"It's about Microsoft Excel"