Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tim Tim is offline
external usenet poster
 
Posts: 408
Default code to save the whole folder with a workbook

Hi All

Is it possible to change this code:
Sub SaveBackup()
ActiveWorkbook.SaveCopyAs "d:\MyBook.xls"
End Sub
to save a copy of the Folder in which is the Book-to back up not only
€śMyBook€ť but the whole current folder with the book?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default code to save the whole folder with a workbook

Tim,

If your source and destination folders are fixed, then it is simple.
The code below will do that. For extra options you can look in your
command box and type "xcopy /?"

ChDrive C:
ChDir "c:\test\"
Myapp = Shell("cmd /c xcopy c:\test d:\test", vbNormalFocus)

If you want to keep your dos box open after proces you can use the "cmd
/k" option this can be handy when an error occur.

Chris

  #3   Report Post  
Posted to microsoft.public.excel.programming
Tim Tim is offline
external usenet poster
 
Posts: 408
Default code to save the whole folder with a workbook



Thak you Chris !!!
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
Force a Readonly Workbook to save to a different folder Charlotte Howard Excel Discussion (Misc queries) 6 August 23rd 06 04:41 PM
save workbook created from templete to a specific folder imh Excel Discussion (Misc queries) 1 June 2nd 06 11:29 PM
Need code to save file to new folder, erase from old folder Ron M. Excel Discussion (Misc queries) 1 February 24th 06 06:02 PM
code to save the whole folder in which is the workbook Tim Excel Programming 4 June 30th 05 11:40 PM
prevent user from saving file to a folder but allow my code to save from behind. susie Excel Programming 3 July 25th 03 03:01 PM


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