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. |
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. |
All times are GMT +1. The time now is 01:26 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com