Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Ron M.
 
Posts: n/a
Default Need code to save file to new folder, erase from old folder

I've tried working this out through VBA Help, but just can't get it
running. Can someone please help?
---------
Here's the task:

The user double clicks on a file in folderone to open it.

She makes some changes in a few cells, and saves it to foldertwo.

What we need is a button linked to some code that, after she makes her
changes, when she clicks on the button, it will save the file to
foldertwo, and delete it from folderone. The file name remains
unchanged.
-----------
This is for some funding review work we're doing. We fill in a template
spreadsheet on a project, then save it to a "ready for review" folder
(folderone).

Later, the final reviewer goes to that folder, opens the file, reviews
it, maybe changes a couple of things, then saves it to an "approved"
folder (foldertwo).

Then she goes back to the "ready to review" folder and deletes the
original, so they won't accumulate there.

She has hundreds of these to do, and it's extremely time-consuming and
tedious doing all this opening/saving/closing/deleting manually. So I'm
trying to make a button that will do it for her.

Thanks very much,
Ron M.

  #2   Report Post  
Posted to microsoft.public.excel.misc
Bernie Deitrick
 
Posts: n/a
Default Need code to save file to new folder, erase from old folder

Ron,

As the save macro:

Sub SaveInApprovedFolder()
Dim DeleteFile As String

Application.DisplayAlerts = False
DeleteFile = ActiveWorkbook.FullName
ActiveWorkbook.SaveAs "Drive:\Approved file path\" & ActiveWorkbook.Name
Kill DeleteFile
Application.DisplayAlerts = True
End Sub

HTH,
Bernie
MS Excel MVP


"Ron M." wrote in message
oups.com...
I've tried working this out through VBA Help, but just can't get it
running. Can someone please help?
---------
Here's the task:

The user double clicks on a file in folderone to open it.

She makes some changes in a few cells, and saves it to foldertwo.

What we need is a button linked to some code that, after she makes her
changes, when she clicks on the button, it will save the file to
foldertwo, and delete it from folderone. The file name remains
unchanged.
-----------
This is for some funding review work we're doing. We fill in a template
spreadsheet on a project, then save it to a "ready for review" folder
(folderone).

Later, the final reviewer goes to that folder, opens the file, reviews
it, maybe changes a couple of things, then saves it to an "approved"
folder (foldertwo).

Then she goes back to the "ready to review" folder and deletes the
original, so they won't accumulate there.

She has hundreds of these to do, and it's extremely time-consuming and
tedious doing all this opening/saving/closing/deleting manually. So I'm
trying to make a button that will do it for her.

Thanks very much,
Ron M.



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
Macro Save File (Unique file name) SJC Excel Worksheet Functions 5 October 27th 05 10:09 PM
file folder macro's shrek Links and Linking in Excel 3 September 16th 05 10:17 PM
Excel XP: File name in Title Bar not changed after Save As... Dominic Excel Discussion (Misc queries) 9 August 1st 05 12:58 PM
How do you open a template at startup? James Kendall Excel Discussion (Misc queries) 7 July 26th 05 07:33 PM
Weekly Transaction Processing Ralph Howarth Excel Worksheet Functions 4 January 19th 05 05:37 AM


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