Get a macro to delete it's file when closed

Saa62

New Member
Joined
Mar 20, 2002
Messages
20
I know this may sound strange, but I want to be able to delete the file after the macro has been run. Part of the macro makes a copy of the file into another folder. The original file needs to be deleted after the file has been copied. Is this possible?

Thanks

Scott
 
I got the second routine in this thread to work. The first one I had problems with the Kill command. It may have been something I was doing wrong. Anyway I have one more desire to complete this routine. Is it possible to get excel to close when it is all finished. I tried Quit.Application in a couple of different places but without success. Any suggestions?

PS I guess I can live with everyone at work thinking I am a genious, I will just have to be carefull not to let it go to my head.

Thanks

Scott
 
Upvote 0

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Forum statistics

Threads
1,214,985
Messages
6,122,603
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top