killing an open file

sassriverrat

Well-known Member
Joined
Oct 4, 2018
Messages
655
I have a workbook that recognizes (through the registry) the first time it's been opened, generates its own folders and directories during that first time being opened, and a number of other things. I'd like a macro that basically will allow the user to drag to receive the workbook via email (for the first time), save it on their computer, open it, allow it to go through the first time being opened and added in the registry, and then when it generates its directory/save folders, it will save itself under the same name in the new folder and then delete the previous copy (the imported). All of the save portions are fairly easy for me. I'm not sure, however, how to kill the original file without specifying an address like "kill "C:\blah\blah" I want it to be dynamic so if the user saves the first time file into downloads, it'll delete that file, and if another user saves it for the first time on the desktop, it'll delete from desktop. Make sense? Thanks
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
I don't have a solution, but I wonder about the security of the recipient even allowing the file to open on their system. That would probably have to be part of the file certification.
 
Upvote 0

Forum statistics

Threads
1,223,970
Messages
6,175,726
Members
452,667
Latest member
vanessavalentino83

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